8 template <class T, T LowerBound, T UpperBound>
16 This is a [link metafunction_class template metafunction class].
20 [[`T`] [integral type]]
21 [[`LowerBound`] [value of type `T`]]
22 [[`UpperBound`] [value of type `T`]]
23 [[`U`] [[link boxed_value boxed integral value]]]
28 Metafunction class verifying that `U` is in the `[LowerBound..UpperBound]` range
33 #include <boost/metaparse/util/in_range_c.hpp>
35 [h1 Expression semantics]
37 For any `T` integral type, `A`, `B` values of type `T` and `C` wrapped value the
38 following are equivalent:
40 in_range_c<T, A, B>::apply<C>::type::value
42 A <= C::type::value && C::type::value <= B
46 #include <boost/metaparse/util/in_range_c.hpp>
48 #include <type_traits>
50 using namespace boost::metaparse;
53 !util::in_range_c<int, 11, 13>
54 ::apply<std::integral_constant<int, 10>>::type::value,
55 "A value below the lower bound should not be in the range"
59 !util::in_range_c<int, 11, 13>
60 ::apply<std::integral_constant<int, 14>>::type::value,
61 "A value above the upper bound should not be in the range"
65 util::in_range_c<int, 11, 13>
66 ::apply<std::integral_constant<int, 11>>::type::value,
67 "The lower bound should be in the range"
71 util::in_range_c<int, 11, 13>
72 ::apply<std::integral_constant<int, 13>>::type::value,
73 "The upper bound should be in the range"
77 util::in_range_c<int, 11, 13>
78 ::apply<std::integral_constant<int, 12>>::type::value,
79 "A value between the bounds should be in the range"