]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/chrono/test/duration/constructor_pass.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / chrono / test / duration / constructor_pass.cpp
index b744e159c56ac1c7b59966472dba815f9a44f2af..54b76b70128446cdfa8f9628b1f39b7c53a628ab 100644 (file)
@@ -34,10 +34,13 @@ check_default()
     D d;
     BOOST_TEST(d.count() == typename D::rep());
   }
-  {
-    BOOST_CONSTEXPR D d;
-    BOOST_CONSTEXPR_ASSERT(d.count() == typename D::rep());
-  }
+}
+template <class D>
+void
+check_constexpr()
+{
+  BOOST_CONSTEXPR D d(0);
+  BOOST_CONSTEXPR_ASSERT(d.count() == typename D::rep());
 }
 
 template <class D, class R>
@@ -89,6 +92,9 @@ int main()
     {
       check_default<boost::chrono::duration<Rep> >();
     }
+    {
+      check_constexpr<boost::chrono::duration<int> >();
+    }
     // constructor from rep
     {
         check_from_rep<boost::chrono::duration<int> >(5);