mirror of https://github.com/CGAL/cgal
Don't use Dynamic_dimension_tag::value.
This commit is contained in:
parent
fc4e4212f2
commit
cb4ca9d8c8
|
|
@ -60,9 +60,7 @@ struct Dimension_tag
|
|||
static const int value = dim;
|
||||
};
|
||||
|
||||
struct Dynamic_dimension_tag {
|
||||
static const int value = UNKNOWN_DIMENSION;
|
||||
};
|
||||
struct Dynamic_dimension_tag {};
|
||||
|
||||
|
||||
namespace internal {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgKernelDKernels
|
||||
|
||||
A model for `Kernel_d` (and even `KernelWithLifting_d`) that uses %Cartesian coordinates to represent the
|
||||
A model for `Kernel_d` (and even `KernelWithLifting_d`) that uses %Cartesian coordinates to represent the
|
||||
geometric objects. In order for `Cartesian_d` to model Euclidean geometry
|
||||
in \f$ E^d\f$ , for some mathematical field \f$ E\f$ (<I>e.g.</I>,
|
||||
the rationals \f$\mathbb{Q}\f$ or the reals \f$\mathbb{R}\f$), the template parameter `FieldNumberType`
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgKernelDKernels
|
||||
|
||||
A model for a `Kernel_d` (and even `KernelWithLifting_d`) using homogeneous coordinates to represent the
|
||||
A model for a `Kernel_d` (and even `KernelWithLifting_d`) using homogeneous coordinates to represent the
|
||||
geometric objects. In order for `Homogeneous` to model Euclidean geometry
|
||||
in \f$ E^d\f$, for some mathematical ring \f$ E\f$ (<I>e.g.</I>,
|
||||
the integers \f$\mathbb{Z}\f$ or the rationals \f$\mathbb{Q}\f$), the template parameter `RT`
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ replacing operators, especially for equality testing.
|
|||
|
||||
\cgalHasModel `CGAL::Cartesian_d<FieldNumberType>`
|
||||
\cgalHasModel `CGAL::Homogeneous_d<RingNumberType>`
|
||||
\cgalHasModel `CGAL::Epick_d<DimensionTag>`
|
||||
\cgalHasModel `CGAL::Epick_d<DimensionTag>`
|
||||
*/
|
||||
class Kernel_d {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -7,16 +7,17 @@
|
|||
#include <CGAL/Kernel/Return_base_tag.h>
|
||||
#include <CGAL/transforming_iterator.h>
|
||||
#include <CGAL/NewKernel_d/store_kernel.h>
|
||||
#include <CGAL/Dimension.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace CartesianDVectorBase {
|
||||
#ifndef CGAL_CXX11
|
||||
namespace internal {
|
||||
template<class R_,int dim_> struct Construct_LA_vector_ {
|
||||
template<class R_,class Dim_> struct Construct_LA_vector_ {
|
||||
struct Never_use {};
|
||||
void operator()(Never_use)const;
|
||||
};
|
||||
#define CODE(Z,N,_) template<class R> struct Construct_LA_vector_<R,N> { \
|
||||
#define CODE(Z,N,_) template<class R> struct Construct_LA_vector_<R,Dimension_tag<N> > { \
|
||||
typedef typename R::Constructor Constructor; \
|
||||
typedef typename Get_type<R, RT_tag>::type RT; \
|
||||
typedef typename R::Vector_ result_type; \
|
||||
|
|
@ -37,7 +38,7 @@ BOOST_PP_REPEAT_FROM_TO(2, 11, CODE, _ )
|
|||
template<class R_,class Zero_> struct Construct_LA_vector
|
||||
: private Store_kernel<R_>
|
||||
#ifndef CGAL_CXX11
|
||||
, public internal::Construct_LA_vector_<R_,R_::Default_ambient_dimension::value>
|
||||
, public internal::Construct_LA_vector_<R_,typename R_::Default_ambient_dimension>
|
||||
#endif
|
||||
{
|
||||
//CGAL_FUNCTOR_INIT_IGNORE(Construct_LA_vector)
|
||||
|
|
@ -48,7 +49,6 @@ template<class R_,class Zero_> struct Construct_LA_vector
|
|||
typedef typename Get_type<R, FT_tag>::type FT;
|
||||
typedef typename R::Vector_ result_type;
|
||||
typedef typename R_::Default_ambient_dimension Dimension;
|
||||
static const int static_dim=Dimension::value;
|
||||
result_type operator()(int d)const{
|
||||
CGAL_assertion(check_dimension_eq(d,this->kernel().dimension()));
|
||||
return typename Constructor::Dimension()(d);
|
||||
|
|
@ -75,19 +75,21 @@ template<class R_,class Zero_> struct Construct_LA_vector
|
|||
#ifdef CGAL_CXX11
|
||||
template<class...U>
|
||||
typename std::enable_if<Constructible_from_each<RT,U...>::value &&
|
||||
(sizeof...(U)==static_dim), result_type>::type
|
||||
boost::is_same<Dimension_tag<sizeof...(U)>, Dimension>::value,
|
||||
result_type>::type
|
||||
operator()(U&&...u)const{
|
||||
return typename Constructor::Values()(std::forward<U>(u)...);
|
||||
}
|
||||
//template<class...U,class=typename std::enable_if<Constructible_from_each<RT,U...>::value>::type,class=typename std::enable_if<(sizeof...(U)==static_dim+1)>::type,class=void>
|
||||
template<class...U>
|
||||
typename std::enable_if<Constructible_from_each<RT,U...>::value &&
|
||||
(sizeof...(U)==static_dim+1), result_type>::type
|
||||
boost::is_same<Dimension_tag<sizeof...(U)-1>, Dimension>::value,
|
||||
result_type>::type
|
||||
operator()(U&&...u)const{
|
||||
return Apply_to_last_then_rest()(typename Constructor::Values_divide(),std::forward<U>(u)...);
|
||||
}
|
||||
#else
|
||||
using internal::Construct_LA_vector_<R_,R::Default_ambient_dimension::value>::operator();
|
||||
using internal::Construct_LA_vector_<R_,typename R::Default_ambient_dimension>::operator();
|
||||
#endif
|
||||
template<class Iter> inline
|
||||
typename boost::enable_if<is_iterator_type<Iter,std::forward_iterator_tag>,result_type>::type operator()
|
||||
|
|
|
|||
Loading…
Reference in New Issue