[algorithms/detail] Rename const_conformant<> to copy_const<> and implement it without MPL and TypeTraits

This commit is contained in:
Adam Wulkiewicz
2014-06-08 16:30:20 +02:00
parent 1e6f7164e1
commit 928f1aad70

View File

@@ -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