public:
typedef typename value_policies::value_type value_type;
// typedef except_type exception_type;
- constrained_value(value_type value) : value_((min)())
+ BOOST_CXX14_CONSTEXPR constrained_value(value_type value) : value_((min)())
{
assign(value);
}
- constrained_value& operator=(value_type v)
+ BOOST_CXX14_CONSTEXPR constrained_value& operator=(value_type v)
{
assign(v);
return *this;
}
//! Return the max allowed value (traits method)
- static value_type max BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::max)();}
+ static BOOST_CONSTEXPR value_type
+ max BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::max)();}
+
//! Return the min allowed value (traits method)
- static value_type min BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::min)();}
+ static BOOST_CONSTEXPR value_type
+ min BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::min)();}
+
//! Coerce into the representation type
- operator value_type() const {return value_;}
+ BOOST_CXX14_CONSTEXPR operator value_type() const {return value_;}
protected:
value_type value_;
private:
public:
typedef rep_type value_type;
- static rep_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return min_value; }
- static rep_type max BOOST_PREVENT_MACRO_SUBSTITUTION () { return max_value; }
+ static BOOST_CONSTEXPR rep_type
+ min BOOST_PREVENT_MACRO_SUBSTITUTION () { return min_value; }
+
+ static BOOST_CONSTEXPR rep_type
+ max BOOST_PREVENT_MACRO_SUBSTITUTION () { return max_value; }
+
static void on_error(rep_type, rep_type, violation_enum)
{
boost::throw_exception(actual_exception_type());