]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/date_time/constrained_value.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / date_time / constrained_value.hpp
index cba6461bae8a3e580f8ed6a4452055e93dfab814..2aa09f65ac7f571f5e6740474b0f18698ac2a888 100644 (file)
@@ -43,21 +43,25 @@ namespace CV {
   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:
@@ -103,8 +107,12 @@ namespace CV {
 
   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());