]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/core/geometry_id.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / geometry / core / geometry_id.hpp
index 5fc5a800500c365223eeda53144602d88e7825cf..27901eca4f1a57becc466f139db20b9d7e2d93e0 100644 (file)
@@ -4,6 +4,10 @@
 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
 
+// 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
+
 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
 
@@ -16,9 +20,9 @@
 #define BOOST_GEOMETRY_CORE_GEOMETRY_ID_HPP
 
 
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/int.hpp>
+#include <type_traits>
 
+#include <boost/geometry/core/static_assert.hpp>
 #include <boost/geometry/core/tag.hpp>
 #include <boost/geometry/core/tags.hpp>
 
@@ -34,48 +38,46 @@ namespace core_dispatch
 template <typename GeometryTag>
 struct geometry_id
 {
-    BOOST_MPL_ASSERT_MSG
-        (
-            false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
-            , (types<GeometryTag>)
-        );
+    BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
+        "Not implemented for this Geometry type.",
+        GeometryTag);
 };
 
 
 template <>
-struct geometry_id<point_tag>            : boost::mpl::int_<1> {};
+struct geometry_id<point_tag>            : std::integral_constant<int, 1> {};
 
 
 template <>
-struct geometry_id<linestring_tag>       : boost::mpl::int_<2> {};
+struct geometry_id<linestring_tag>       : std::integral_constant<int, 2> {};
 
 
 template <>
-struct geometry_id<polygon_tag>          : boost::mpl::int_<3> {};
+struct geometry_id<polygon_tag>          : std::integral_constant<int, 3> {};
 
 
 template <>
-struct geometry_id<multi_point_tag>      : boost::mpl::int_<4> {};
+struct geometry_id<multi_point_tag>      : std::integral_constant<int, 4> {};
 
 
 template <>
-struct geometry_id<multi_linestring_tag> : boost::mpl::int_<5> {};
+struct geometry_id<multi_linestring_tag> : std::integral_constant<int, 5> {};
 
 
 template <>
-struct geometry_id<multi_polygon_tag>    : boost::mpl::int_<6> {};
+struct geometry_id<multi_polygon_tag>    : std::integral_constant<int, 6> {};
 
 
 template <>
-struct geometry_id<segment_tag>          : boost::mpl::int_<92> {};
+struct geometry_id<segment_tag>          : std::integral_constant<int, 92> {};
 
 
 template <>
-struct geometry_id<ring_tag>             : boost::mpl::int_<93> {};
+struct geometry_id<ring_tag>             : std::integral_constant<int, 93> {};
 
 
 template <>
-struct geometry_id<box_tag>              : boost::mpl::int_<94> {};
+struct geometry_id<box_tag>              : std::integral_constant<int, 94> {};
 
 
 } // namespace core_dispatch
@@ -86,7 +88,7 @@ struct geometry_id<box_tag>              : boost::mpl::int_<94> {};
 /*!
 \brief Meta-function returning the id of a geometry type
 \details The meta-function geometry_id defines a numerical ID (based on
-    boost::mpl::int_<...> ) for each geometry concept. A numerical ID is
+    std::integral_constant<int, ...> ) for each geometry concept. A numerical ID is
     sometimes useful, and within Boost.Geometry it is used for the
     reverse_dispatch metafuntion.
 \note Used for e.g. reverse meta-function