mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-13 00:22:10 +00:00
[algorithms/detail] Rename const_conformant<> to copy_const<> and implement it without MPL and TypeTraits
This commit is contained in:
@@ -9,10 +9,8 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERIOR_ITERATOR_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERIOR_ITERATOR_HPP
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
#include <boost/geometry/core/interior_type.hpp>
|
||||
|
||||
@@ -38,14 +36,15 @@ struct interior_iterator
|
||||
};
|
||||
|
||||
template <typename BaseT, typename T>
|
||||
struct const_conformant
|
||||
struct copy_const
|
||||
{
|
||||
typedef typename boost::mpl::if_
|
||||
<
|
||||
boost::is_const<BaseT>,
|
||||
T const,
|
||||
T
|
||||
>::type type;
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <typename BaseT, typename T>
|
||||
struct copy_const<BaseT const, T>
|
||||
{
|
||||
typedef T const type;
|
||||
};
|
||||
|
||||
template <typename Geometry>
|
||||
@@ -53,7 +52,7 @@ struct interior_ring_iterator
|
||||
{
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
typename const_conformant
|
||||
typename copy_const
|
||||
<
|
||||
typename geometry::interior_type<Geometry>::type,
|
||||
typename boost::range_value
|
||||
|
||||
Reference in New Issue
Block a user