mirror of https://github.com/CGAL/cgal
Introduced CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES and used it
This commit is contained in:
parent
c43c7ceac8
commit
d10ed5ad2c
|
|
@ -200,50 +200,8 @@ public:
|
|||
// alias template. This feature can be mimiked by non C++11 support simply by
|
||||
// defining a type that inherits from the template we need to alias. However,
|
||||
// the non-C++11 code requires the (re)definition of all constructors of the
|
||||
// derived class. The non-C++11 code follows the commented out C++11 code.
|
||||
// When we move to C++11 we can use the more elgant code.
|
||||
#if 0
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using Construction_helper =
|
||||
Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_construction_helper =
|
||||
Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the insertion surface-sweep visitor.
|
||||
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Insertion_helper =
|
||||
Arr_bounded_planar_insertion_helper<I_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection insertion surface-sweep visitor.
|
||||
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_insertion_helper =
|
||||
Arr_bounded_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the batched point-location surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Batched_point_location_helper =
|
||||
Arr_bounded_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the vertical decomposition sweep-line visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Vertical_decomposition_helper =
|
||||
Arr_bounded_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the overlay surface-sweep visitor.
|
||||
template <typename Gt, typename Evt, typename Crv,
|
||||
typename ArrA, typename ArrB>
|
||||
using Overlay_helper =
|
||||
Arr_bounded_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
|
||||
|
||||
#else
|
||||
// derived class.
|
||||
#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES)
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
struct Construction_helper :
|
||||
|
|
@ -318,6 +276,46 @@ public:
|
|||
Base;
|
||||
Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {}
|
||||
};
|
||||
#else
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using Construction_helper =
|
||||
Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_construction_helper =
|
||||
Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the insertion surface-sweep visitor.
|
||||
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Insertion_helper =
|
||||
Arr_bounded_planar_insertion_helper<I_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection insertion surface-sweep visitor.
|
||||
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_insertion_helper =
|
||||
Arr_bounded_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the batched point-location surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Batched_point_location_helper =
|
||||
Arr_bounded_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the vertical decomposition sweep-line visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Vertical_decomposition_helper =
|
||||
Arr_bounded_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the overlay surface-sweep visitor.
|
||||
template <typename Gt, typename Evt, typename Crv,
|
||||
typename ArrA, typename ArrB>
|
||||
using Overlay_helper =
|
||||
Arr_bounded_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
|
||||
#endif
|
||||
//@}
|
||||
|
||||
|
|
|
|||
|
|
@ -315,49 +315,7 @@ public:
|
|||
// the non-C++11 code requires the (re)definition of all constructors of the
|
||||
// derived class. The non-C++11 code follows the commented out C++11 code.
|
||||
// When we move to C++11 we can use the more elgant code.
|
||||
#if 0
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using Construction_helper =
|
||||
Arr_spherical_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_construction_helper =
|
||||
Arr_spherical_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the insertion surface-sweep visitor.
|
||||
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Insertion_helper =
|
||||
Arr_spherical_insertion_helper<I_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection insertion surface-sweep visitor.
|
||||
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_insertion_helper =
|
||||
Arr_spherical_insertion_helper<Nxi_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the batched point-location surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Batched_point_location_helper =
|
||||
Arr_spherical_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the vertical decomposition surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Vertical_decomposition_helper =
|
||||
Arr_spherical_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the overlay surface-sweep visitor.
|
||||
template <typename Gt, typename Evt, typename Crv,
|
||||
typename ArrA, typename ArrB>
|
||||
using Overlay_helper =
|
||||
Arr_spherical_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
|
||||
|
||||
#else
|
||||
|
||||
#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES)
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
struct Construction_helper :
|
||||
|
|
@ -432,7 +390,46 @@ public:
|
|||
Base;
|
||||
Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {}
|
||||
};
|
||||
#else
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using Construction_helper =
|
||||
Arr_spherical_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_construction_helper =
|
||||
Arr_spherical_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the insertion surface-sweep visitor.
|
||||
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Insertion_helper =
|
||||
Arr_spherical_insertion_helper<I_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection insertion surface-sweep visitor.
|
||||
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_insertion_helper =
|
||||
Arr_spherical_insertion_helper<Nxi_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the batched point-location surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Batched_point_location_helper =
|
||||
Arr_spherical_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the vertical decomposition surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Vertical_decomposition_helper =
|
||||
Arr_spherical_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the overlay surface-sweep visitor.
|
||||
template <typename Gt, typename Evt, typename Crv,
|
||||
typename ArrA, typename ArrB>
|
||||
using Overlay_helper =
|
||||
Arr_spherical_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
|
||||
#endif
|
||||
//@}
|
||||
|
||||
|
|
|
|||
|
|
@ -218,49 +218,8 @@ public:
|
|||
// alias template. This feature can be mimiked by non C++11 support simply by
|
||||
// defining a type that inherits from the template we need to alias. However,
|
||||
// the non-C++11 code requires the (re)definition of all constructors of the
|
||||
// derived class. The non-C++11 code follows the commented out C++11 code.
|
||||
// When we move to C++11 we can use the more elgant code.
|
||||
#if 0
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using Construction_helper =
|
||||
Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_construction_helper =
|
||||
Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the insertion surface-sweep visitor.
|
||||
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Insertion_helper =
|
||||
Arr_unb_planar_insertion_helper<I_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection insertion surface-sweep visitor.
|
||||
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_insertion_helper =
|
||||
Arr_unb_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the batched point-location surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Batched_point_location_helper =
|
||||
Arr_unb_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the vertical decomposition surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Vertical_decomposition_helper =
|
||||
Arr_unb_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the overlay surface-sweep visitor.
|
||||
template <typename Gt, typename Evt, typename Crv,
|
||||
typename ArrA, typename ArrB>
|
||||
using Overlay_helper =
|
||||
Arr_unb_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
|
||||
#else
|
||||
// derived class.
|
||||
#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES)
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
struct Construction_helper :
|
||||
|
|
@ -335,6 +294,46 @@ public:
|
|||
Base;
|
||||
Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {}
|
||||
};
|
||||
#else
|
||||
// Type definition for the construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using Construction_helper =
|
||||
Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection construction surface-sweep visitor.
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_construction_helper =
|
||||
Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the insertion surface-sweep visitor.
|
||||
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Insertion_helper =
|
||||
Arr_unb_planar_insertion_helper<I_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the no-intersection insertion surface-sweep visitor.
|
||||
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using No_intersection_insertion_helper =
|
||||
Arr_unb_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the batched point-location surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Batched_point_location_helper =
|
||||
Arr_unb_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the vertical decomposition surface-sweep visitor.
|
||||
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
|
||||
template <typename Evt, typename Crv>
|
||||
using Vertical_decomposition_helper =
|
||||
Arr_unb_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>;
|
||||
|
||||
// Type definition for the overlay surface-sweep visitor.
|
||||
template <typename Gt, typename Evt, typename Crv,
|
||||
typename ArrA, typename ArrB>
|
||||
using Overlay_helper =
|
||||
Arr_unb_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
|
||||
#endif
|
||||
//@}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
// ETH Zurich (Switzerland),
|
||||
// INRIA Sophia-Antipolis (France),
|
||||
// Max-Planck-Institute Saarbruecken (Germany),
|
||||
// and Tel-Aviv University (Israel). All rights reserved.
|
||||
// and Tel-Aviv University (Israel). All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
|
|
@ -18,9 +18,9 @@
|
|||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Wieger Wesselink
|
||||
//
|
||||
// Author(s) : Wieger Wesselink
|
||||
// Michael Hoffmann <hoffmann@inf.ethz.ch>
|
||||
// Sylvain Pion
|
||||
// Laurent Rineau
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
# define BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
// The following header file defines among other things BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
// The following header file defines among other things BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
|
|
@ -223,6 +223,10 @@
|
|||
|| (BOOST_VERSION < 103600)
|
||||
#define CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \
|
||||
defined(BOOST_NO_TEMPLATE_ALIASES) || (BOOST_VERSION < 103900)
|
||||
#define CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES 1
|
||||
#endif
|
||||
|
||||
// Some random list to let us write C++11 without thinking about
|
||||
// each feature we are using.
|
||||
|
|
@ -262,7 +266,7 @@
|
|||
#define CGAL_VERSION_NUMBER(x,y,z) (1000001 + 10000*x + 100*y + 10*z) * 1000
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
#define CGAL_BEGIN_NAMESPACE namespace CGAL {
|
||||
#define CGAL_BEGIN_NAMESPACE namespace CGAL {
|
||||
#define CGAL_END_NAMESPACE }
|
||||
#endif
|
||||
|
||||
|
|
@ -374,10 +378,10 @@
|
|||
#endif
|
||||
|
||||
//-------------------------------------------------------------------//
|
||||
// When the global min and max are no longer defined (as macros)
|
||||
// because of NOMINMAX flag definition, we define our own global
|
||||
// When the global min and max are no longer defined (as macros)
|
||||
// because of NOMINMAX flag definition, we define our own global
|
||||
// min/max functions to make the Microsoft headers compile. (afxtempl.h)
|
||||
// Users that does not want the global min/max
|
||||
// Users that does not want the global min/max
|
||||
// should define CGAL_NOMINMAX
|
||||
//-------------------------------------------------------------------//
|
||||
#include <algorithm>
|
||||
|
|
@ -399,7 +403,7 @@ using std::max;
|
|||
# define CGAL_PRETTY_FUNCTION __FUNCSIG__
|
||||
#elif defined __GNUG__
|
||||
# define CGAL_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||
#else
|
||||
#else
|
||||
# define CGAL_PRETTY_FUNCTION __func__
|
||||
// with sunpro, this requires -features=extensions
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue