]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/geometries/point_xyz.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / geometry / test / geometries / point_xyz.cpp
index f52484a2a5e729672f344f0a9bd8e5181d97fc31..00dcc0fd6dca73ecee6b7ebb8f3ed80cd890a257 100644 (file)
@@ -3,6 +3,10 @@
 
 // Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
 
+// This file was modified by Oracle on 2020.
+// Modifications copyright (c) 2020, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
 // Use, modification and distribution is subject to the Boost Software License,
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -61,12 +65,23 @@ void test_copy_assignment()
     check_point_xyz(p, 4, 5, 6);
 }
 
+template <typename T>
+void test_constexpr()
+{
+    typedef bg::model::d3::point_xyz<T> P;
+    constexpr P p = P(1, 2, 3);
+    constexpr T c = bg::get<0>(p);
+    BOOST_CHECK_EQUAL(c, 1);
+    check_point_xyz(p, 1, 2, 3);
+}
+
 template <typename T>
 void test_all()
 {
     test_default_constructor<T>();
     test_copy_constructor<T>();
     test_copy_assignment<T>();
+    test_constexpr<T>();
 }
 
 int test_main(int, char* [])