Warning, file /include/boost/geometry/index/detail/meta.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_META_HPP
0014 #define BOOST_GEOMETRY_INDEX_DETAIL_META_HPP
0015
0016 #include <type_traits>
0017
0018
0019
0020 namespace boost { namespace geometry { namespace index { namespace detail {
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 template <typename T, typename Value, typename Indexable, typename ResultType, int Ver>
0046 struct convertible_type_impl
0047 {
0048 typedef ResultType type;
0049 };
0050
0051 template <typename T, typename Value, typename Indexable>
0052 struct convertible_type_impl<T, Value, Indexable, void, 0>
0053 {
0054 typedef std::conditional_t
0055 <
0056 std::is_convertible<T, Indexable>::value,
0057 Indexable,
0058 void
0059 > result_type;
0060
0061 typedef typename convertible_type_impl
0062 <
0063 T, Value, Indexable, result_type, 1
0064 >::type type;
0065 };
0066
0067 template <typename T, typename Value, typename Indexable>
0068 struct convertible_type_impl<T, Value, Indexable, void, 1>
0069 {
0070 typedef std::conditional_t
0071 <
0072 std::is_convertible<T, Value>::value,
0073 Value,
0074 void
0075 > type;
0076 };
0077
0078 template <typename T, typename Value, typename Indexable>
0079 struct convertible_type
0080 {
0081 typedef std::conditional_t
0082 <
0083 std::is_same<T, Value>::value,
0084 Value,
0085 std::conditional_t
0086 <
0087 std::is_same<T, Indexable>::value,
0088 Indexable,
0089 void
0090 >
0091 > result_type;
0092
0093 typedef typename convertible_type_impl
0094 <
0095 T, Value, Indexable, result_type, 0
0096 >::type type;
0097 };
0098
0099 }}}}
0100
0101 #endif