]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/iterators/flatten_iterator.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / iterators / flatten_iterator.hpp
index 190e594132fa1ccb4526735869bc8f4f0349457f..cfe232b4e9aab6d78c97bbe4b7bf1edbd264a671 100644 (file)
@@ -1,6 +1,6 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 
-// Copyright (c) 2014-2020, Oracle and/or its affiliates.
+// Copyright (c) 2014-2021, Oracle and/or its affiliates.
 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 
 #ifndef BOOST_GEOMETRY_ITERATORS_FLATTEN_ITERATOR_HPP
 #define BOOST_GEOMETRY_ITERATORS_FLATTEN_ITERATOR_HPP
 
+
 #include <type_traits>
 
 #include <boost/iterator/iterator_facade.hpp>
 #include <boost/iterator/iterator_categories.hpp>
 
 #include <boost/geometry/core/assert.hpp>
-#include <boost/geometry/core/static_assert.hpp>
+
 
 namespace boost { namespace geometry
 {
@@ -58,7 +59,7 @@ public:
     typedef InnerIterator inner_iterator_type;
 
     // default constructor
-    flatten_iterator() {}
+    flatten_iterator() = default;
 
     // for begin
     flatten_iterator(OuterIterator outer_it, OuterIterator outer_end)
@@ -77,7 +78,13 @@ public:
         typename OtherOuterIterator, typename OtherInnerIterator,
         typename OtherValue,
         typename OtherAccessInnerBegin, typename OtherAccessInnerEnd,
-        typename OtherReference
+        typename OtherReference,
+        std::enable_if_t
+            <
+                std::is_convertible<OtherOuterIterator, OuterIterator>::value
+                && std::is_convertible<OtherInnerIterator, InnerIterator>::value,
+                int
+            > = 0
     >
     flatten_iterator(flatten_iterator
                      <
@@ -91,21 +98,9 @@ public:
         : m_outer_it(other.m_outer_it),
           m_outer_end(other.m_outer_end),
           m_inner_it(other.m_inner_it)
-    {
-        static const bool are_conv
-            = std::is_convertible
-                <
-                    OtherOuterIterator, OuterIterator
-                >::value
-           && std::is_convertible
-                <
-                    OtherInnerIterator, InnerIterator
-                >::value;
+    {}
 
-        BOOST_GEOMETRY_STATIC_ASSERT((are_conv),
-            "Other iterators have to be convertible to member iterators.",
-            OtherOuterIterator, OtherInnerIterator);
-    }
+    flatten_iterator(flatten_iterator const& other) = default;
 
     flatten_iterator& operator=(flatten_iterator const& other)
     {