mirror of https://github.com/CGAL/cgal
boost::remove_const -> std::remove_const_t
This commit is contained in:
parent
5a8736d666
commit
61834d5a26
|
|
@ -17,7 +17,6 @@
|
|||
#include <CGAL/boost/graph/properties.h>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
namespace CGAL{
|
||||
|
||||
|
|
@ -25,7 +24,7 @@ namespace CGAL{
|
|||
template < class TriangleMesh,
|
||||
class VertexPointMap = typename boost::property_map<TriangleMesh,vertex_point_t>::type >
|
||||
struct Triangle_from_face_descriptor_map{
|
||||
typename boost::remove_const<TriangleMesh>::type* m_tm;
|
||||
typename std::remove_const_t<TriangleMesh>* m_tm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
Triangle_from_face_descriptor_map()
|
||||
|
|
@ -33,13 +32,13 @@ struct Triangle_from_face_descriptor_map{
|
|||
{}
|
||||
|
||||
Triangle_from_face_descriptor_map(TriangleMesh const* tm)
|
||||
: m_tm( const_cast<typename boost::remove_const<TriangleMesh>::type*>(tm) )
|
||||
: m_tm( const_cast<std::remove_const_t<TriangleMesh>*>(tm) )
|
||||
, m_vpm( get(vertex_point, *m_tm) )
|
||||
{}
|
||||
|
||||
Triangle_from_face_descriptor_map(TriangleMesh const* tm,
|
||||
VertexPointMap vpm )
|
||||
: m_tm(const_cast<typename boost::remove_const<TriangleMesh>::type*>(tm))
|
||||
: m_tm(const_cast<std::remove_const_t<TriangleMesh>*>(tm))
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
|
|
@ -57,7 +56,7 @@ struct Triangle_from_face_descriptor_map{
|
|||
get(const Triangle_from_face_descriptor_map<TriangleMesh,VertexPointMap>& pmap,
|
||||
key_type f)
|
||||
{
|
||||
typename boost::remove_const<TriangleMesh>::type & tm = *(pmap.m_tm);
|
||||
std::remove_const_t<TriangleMesh>& tm = *(pmap.m_tm);
|
||||
CGAL_precondition(halfedge(f,tm) == next(next(next(halfedge(f,tm),tm),tm),tm));
|
||||
|
||||
return value_type( get(pmap.m_vpm, target(halfedge(f,tm),tm)),
|
||||
|
|
@ -70,7 +69,7 @@ struct Triangle_from_face_descriptor_map{
|
|||
get(const Triangle_from_face_descriptor_map<TriangleMesh,VertexPointMap>& pmap,
|
||||
const std::pair<key_type, const TriangleMesh*>& f)
|
||||
{
|
||||
typename boost::remove_const<TriangleMesh>::type & tm = *(pmap.m_tm);
|
||||
std::remove_const_t<TriangleMesh> & tm = *(pmap.m_tm);
|
||||
CGAL_precondition(halfedge(f.first,tm) == next(next(next(halfedge(f.first,tm),tm),tm),tm));
|
||||
|
||||
return value_type( get(pmap.m_vpm, target(halfedge(f.first,tm),tm)),
|
||||
|
|
@ -88,13 +87,13 @@ struct Segment_from_edge_descriptor_map{
|
|||
{}
|
||||
|
||||
Segment_from_edge_descriptor_map(PolygonMesh const * pm)
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(pm) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(pm) )
|
||||
, m_vpm( get(vertex_point, *m_pm) )
|
||||
{}
|
||||
|
||||
Segment_from_edge_descriptor_map(PolygonMesh const * pm,
|
||||
VertexPointMap vpm )
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(pm) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(pm) )
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
|
|
@ -106,7 +105,7 @@ struct Segment_from_edge_descriptor_map{
|
|||
typedef value_type reference;
|
||||
typedef boost::readable_property_map_tag category;
|
||||
//data
|
||||
typename boost::remove_const<PolygonMesh>::type* m_pm;
|
||||
std::remove_const_t<PolygonMesh>* m_pm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
//get function for property map
|
||||
|
|
@ -138,16 +137,16 @@ struct One_point_from_face_descriptor_map{
|
|||
{}
|
||||
|
||||
One_point_from_face_descriptor_map(PolygonMesh const * g)
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm( get(vertex_point, *m_pm) )
|
||||
{}
|
||||
|
||||
One_point_from_face_descriptor_map(PolygonMesh const * g, VertexPointMap vpm )
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
typename boost::remove_const<PolygonMesh>::type* m_pm;
|
||||
std::remove_const_t<PolygonMesh>* m_pm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
//classical typedefs
|
||||
|
|
@ -182,12 +181,12 @@ struct Source_point_from_edge_descriptor_map{
|
|||
{}
|
||||
|
||||
Source_point_from_edge_descriptor_map(PolygonMesh const * g)
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm( get(vertex_point, *m_pm) )
|
||||
{}
|
||||
|
||||
Source_point_from_edge_descriptor_map(PolygonMesh const * g, VertexPointMap vpm )
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
|
|
@ -198,7 +197,7 @@ struct Source_point_from_edge_descriptor_map{
|
|||
typedef boost::readable_property_map_tag category;
|
||||
|
||||
//data
|
||||
typename boost::remove_const<PolygonMesh>::type* m_pm;
|
||||
std::remove_const_t<PolygonMesh>* m_pm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
//get function for property map
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <boost/config.hpp>
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <CGAL/boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/graph/properties.hpp>
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@
|
|||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/variant.hpp>
|
||||
|
|
|
|||
|
|
@ -57,14 +57,12 @@ get(Get_curve_index<Primitive>, const typename Primitive::Id id) {
|
|||
|
||||
}} // end namespace CGAL::Mesh_3
|
||||
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
namespace boost {
|
||||
// specialization for using pointers as property maps
|
||||
template <typename Primitive>
|
||||
struct property_traits<CGAL::Mesh_3::Get_curve_index<Primitive> > {
|
||||
typedef typename std::iterator_traits<typename Primitive::Id::first_type>::value_type ConstPair;
|
||||
typedef typename boost::remove_const<typename ConstPair::first_type>::type value_type;
|
||||
typedef std::remove_const_t<typename ConstPair::first_type> value_type;
|
||||
typedef value_type& reference;
|
||||
typedef typename Primitive::Id key_type;
|
||||
typedef readable_property_map_tag category;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class Filtered_projection_traits
|
|||
|
||||
typedef typename boost::property_traits<IndexPropertyMap>::value_type Index_type;
|
||||
|
||||
typedef std::set<typename boost::remove_const<Index_type>::type> Set_of_indices;
|
||||
typedef std::set<std::remove_const_t<Index_type>> Set_of_indices;
|
||||
|
||||
public:
|
||||
template <typename IndexToIgnoreIterator>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <memory>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
|
||||
|
|
@ -118,19 +117,19 @@ public:
|
|||
bool operator>=( const Self& i) const { return !(*this < i); }
|
||||
|
||||
vector_iterator< T,
|
||||
typename boost::remove_const<
|
||||
std::remove_const_t<
|
||||
typename boost::remove_reference<Ref>::type
|
||||
>::type&,
|
||||
typename boost::remove_const<
|
||||
>&,
|
||||
std::remove_const_t<
|
||||
typename boost::remove_pointer<Ptr>::type
|
||||
>::type* >
|
||||
>* >
|
||||
remove_const() const
|
||||
{
|
||||
typedef typename boost::remove_const<
|
||||
typedef std::remove_const_t<
|
||||
typename boost::remove_pointer<Ptr>::type
|
||||
>::type* Ptr_no_c;
|
||||
>* Ptr_no_c;
|
||||
return vector_iterator< T,
|
||||
typename boost::remove_const<typename boost::remove_reference<Ref>::type>::type&,
|
||||
std::remove_const_t<typename boost::remove_reference<Ref>::type>::type&,
|
||||
Ptr_no_c>
|
||||
( const_cast<Ptr_no_c>(ptr) );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue