mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
change range functions adapt
This commit is contained in:
parent
92cc7881d6
commit
8278a2642c
15 changed files with 454 additions and 100 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/integral_constant.hpp>
|
||||
#include <sprout/type_traits/is_same.hpp>
|
||||
#include <sprout/type_traits/identity.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
#include <sprout/adl/not_found.hpp>
|
||||
|
@ -21,7 +22,7 @@ namespace sprout {
|
|||
//
|
||||
template<typename From, typename To>
|
||||
struct is_const_iterator_cast_convertible
|
||||
: public sprout::false_type
|
||||
: public sprout::is_same<typename std::remove_cv<From>::type, typename std::remove_cv<To>::type>
|
||||
{};
|
||||
template<typename From, typename To>
|
||||
struct is_const_iterator_cast_convertible<From, To const>
|
||||
|
@ -105,6 +106,11 @@ namespace sprout {
|
|||
const_iterator_conversion(U* it) {
|
||||
return const_cast<T>(it);
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T
|
||||
const_iterator_conversion(T const& it) {
|
||||
return it;
|
||||
}
|
||||
} // namespace iterator_detail
|
||||
} // namespace sprout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue