Function make_bounded

Synopsis

#include <include/type_safe/bounded_type.hpp>

template <typename T, typename U1, typename U2>
constexpr auto make_bounded(T &&value, U1 &&lower, U2 &&upper) -> detail::make_bounded_type< assertion_verifier, true, true, T, U1, U2 >

Description

Creates a [ts::bounded_type]() to a specified [ts::constraints::closed_interval]().

Returns
A [ts::bounded_type]() with the given value and lower and upper bounds, where the bounds are valid values as well. \requires As it uses [ts::assertion_verifier](), the value must be valid. \notes If this function is passed in dynamic values of the same type as value, it will create a dynamic bound. Otherwise it must be passed static bounds.

Source

Lines 398-405 in include/type_safe/bounded_type.hpp.

   /// \group bound_lit
   template <char... Digits>
   constexpr auto operator"" _boundu()
       -> lit_detail::integer_bound<unsigned long long,
                                    detail::parse<unsigned long long, Digits...>()>
   {
       return {};





Add Discussion as Guest

Log in