File indexing completed on 2025-01-18 10:09:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef RANGES_V3_DETAIL_SATISFY_BOOST_RANGE_HPP
0014 #define RANGES_V3_DETAIL_SATISFY_BOOST_RANGE_HPP
0015
0016 #include <meta/meta.hpp>
0017
0018 #include <range/v3/range_fwd.hpp>
0019
0020 #include <range/v3/range/concepts.hpp>
0021 #include <range/v3/range/traits.hpp>
0022
0023 #ifndef RANGES_DOXYGEN_INVOKED
0024 namespace boost
0025 {
0026
0027
0028 template<typename T, typename U>
0029 struct range_mutable_iterator;
0030
0031
0032
0033 template<typename T, typename U>
0034 struct range_const_iterator;
0035
0036
0037
0038 template<typename T>
0039 struct range_value;
0040
0041
0042
0043 template<typename T>
0044 struct range_size;
0045 }
0046
0047
0048 #define RANGES_SATISFY_BOOST_RANGE(view_name) \
0049 namespace boost \
0050 { \
0051 template<typename... Ts> \
0052 struct range_mutable_iterator< \
0053 view_name<Ts...>, \
0054 ::meta::if_c<(bool)::ranges::common_range<view_name<Ts...>>>> \
0055 { \
0056 using type = ::ranges::iterator_t<view_name<Ts...>>; \
0057 }; \
0058 template<typename... Ts> \
0059 struct range_const_iterator< \
0060 view_name<Ts...>, \
0061 ::meta::if_c<(bool)::ranges::common_range<view_name<Ts...> const>>> \
0062 { \
0063 using type = ::ranges::iterator_t<view_name<Ts...> const>; \
0064 }; \
0065 template<typename... Ts> \
0066 struct range_value<view_name<Ts...>> \
0067 { \
0068 using type = ::ranges::range_value_t<view_name<Ts...>>; \
0069 }; \
0070 template<typename... Ts> \
0071 struct range_size<view_name<Ts...>> \
0072 : ::meta::if_c<(bool)::ranges::common_range<view_name<Ts...>>, \
0073 ::meta::defer<::ranges::range_size_t, view_name<Ts...>>, \
0074 ::meta::nil_> \
0075 {}; \
0076 template<typename... Ts> \
0077 struct range_size<view_name<Ts...> const> \
0078 : ::meta::if_c<(bool)::ranges::common_range<view_name<Ts...> const>, \
0079 ::meta::defer<::ranges::range_size_t, view_name<Ts...> const>, \
0080 ::meta::nil_> \
0081 {}; \
0082 }
0083 #else
0084 #define RANGES_SATISFY_BOOST_RANGE(view_name)
0085 #endif
0086
0087 #endif