[#in_range_c] [section in_range_c] [h1 Synopsis] namespace util { template struct in_range_c { template struct apply; }; } This is a [link metafunction_class template metafunction class]. [table Arguments [[Name] [Type]] [[`T`] [integral type]] [[`LowerBound`] [value of type `T`]] [[`UpperBound`] [value of type `T`]] [[`U`] [[link boxed_value boxed integral value]]] ] [h1 Description] Metafunction class verifying that `U` is in the `[LowerBound..UpperBound]` range or not. [h1 Header] #include [h1 Expression semantics] For any `T` integral type, `A`, `B` values of type `T` and `C` wrapped value the following are equivalent: in_range_c::apply::type::value A <= C::type::value && C::type::value <= B [h1 Example] #include #include using namespace boost::metaparse; static_assert( !util::in_range_c ::apply>::type::value, "A value below the lower bound should not be in the range" ); static_assert( !util::in_range_c ::apply>::type::value, "A value above the upper bound should not be in the range" ); static_assert( util::in_range_c ::apply>::type::value, "The lower bound should be in the range" ); static_assert( util::in_range_c ::apply>::type::value, "The upper bound should be in the range" ); static_assert( util::in_range_c ::apply>::type::value, "A value between the bounds should be in the range" ); [endsect]