mirror of https://github.com/CGAL/cgal
Remove macro CGAL_FORWARDABLE
This commit is contained in:
parent
31dac099c5
commit
4b369cd70e
|
|
@ -168,7 +168,7 @@ template <class Base_> struct Kernel_d_interface : public Base_ {
|
||||||
typedef Kernel R_; // for the macro
|
typedef Kernel R_; // for the macro
|
||||||
CGAL_FUNCTOR_INIT_STORE(Compute_squared_radius_d)
|
CGAL_FUNCTOR_INIT_STORE(Compute_squared_radius_d)
|
||||||
typedef FT result_type;
|
typedef FT result_type;
|
||||||
template<class S> FT operator()(CGAL_FORWARDABLE(S) s)const{
|
template<class S> FT operator()(S&& s)const{
|
||||||
return typename Get_functor<Base, Squared_radius_tag>::type(this->kernel())(CGAL_FORWARD(S,s));
|
return typename Get_functor<Base, Squared_radius_tag>::type(this->kernel())(CGAL_FORWARD(S,s));
|
||||||
}
|
}
|
||||||
template<class I> FT operator()(I b, I e)const{
|
template<class I> FT operator()(I b, I e)const{
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ namespace CGAL {
|
||||||
|
|
||||||
struct Iterator_and_last {
|
struct Iterator_and_last {
|
||||||
template<typename Iter,typename T>
|
template<typename Iter,typename T>
|
||||||
result_type operator()(int d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
|
result_type operator()(int d,Iter const& f,Iter const& e,T&& t) const {
|
||||||
check_dim(d);
|
check_dim(d);
|
||||||
CGAL_assertion(d==std::distance(f,e)+1);
|
CGAL_assertion(d==std::distance(f,e)+1);
|
||||||
result_type a(d);
|
result_type a(d);
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ struct Nth_iterator_element : private Store_kernel<K> {
|
||||||
Nth_iterator_element(){}
|
Nth_iterator_element(){}
|
||||||
Nth_iterator_element(K const&k):Store_kernel<K>(k){}
|
Nth_iterator_element(K const&k):Store_kernel<K>(k){}
|
||||||
typedef typename Get_type<K, typename iterator_tag_traits<T>::value_tag>::type result_type;
|
typedef typename Get_type<K, typename iterator_tag_traits<T>::value_tag>::type result_type;
|
||||||
template<class U> result_type operator()(CGAL_FORWARDABLE(U) u, int i) const {
|
template<class U> result_type operator()(U&& u, int i) const {
|
||||||
typename Get_functor<K, Construct_ttag<T> >::type ci(this->kernel());
|
typename Get_functor<K, Construct_ttag<T> >::type ci(this->kernel());
|
||||||
return *cpp0x::next(ci(CGAL_FORWARD(U,u),Begin_tag()),i);
|
return *cpp0x::next(ci(CGAL_FORWARD(U,u),Begin_tag()),i);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ template<class R_> struct Construct_segment : Store_kernel<R_> {
|
||||||
}
|
}
|
||||||
// T should only be std::piecewise_construct_t, but we shouldn't fail if it doesn't exist.
|
// T should only be std::piecewise_construct_t, but we shouldn't fail if it doesn't exist.
|
||||||
template<class T,class U,class V>
|
template<class T,class U,class V>
|
||||||
result_type operator()(CGAL_FORWARDABLE(T),CGAL_FORWARDABLE(U) u,CGAL_FORWARDABLE(V) v)const{
|
result_type operator()(T&&, U&& u, V&& v)const{
|
||||||
CP cp(this->kernel());
|
CP cp(this->kernel());
|
||||||
result_type r = {{
|
result_type r = {{
|
||||||
call_on_tuple_elements<Point>(cp, CGAL_FORWARD(U,u)),
|
call_on_tuple_elements<Point>(cp, CGAL_FORWARD(U,u)),
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ template<class NT_,class Dim_,class Max_dim_=Dim_> struct Array_vector {
|
||||||
|
|
||||||
struct Iterator_and_last {
|
struct Iterator_and_last {
|
||||||
template<typename Iter,typename T>
|
template<typename Iter,typename T>
|
||||||
Vector operator()(unsigned CGAL_assertion_code(d),Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
|
Vector operator()(unsigned CGAL_assertion_code(d),Iter const& f,Iter const& e,T&& t) const {
|
||||||
CGAL_assertion(d==std::distance(f,e)+1);
|
CGAL_assertion(d==std::distance(f,e)+1);
|
||||||
CGAL_assertion(d<=d_);
|
CGAL_assertion(d<=d_);
|
||||||
//TODO: optimize for forward iterators
|
//TODO: optimize for forward iterators
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ template<class NT_,class Dim_,class Max_dim_=Dim_> struct Vector_vector {
|
||||||
|
|
||||||
struct Iterator_and_last {
|
struct Iterator_and_last {
|
||||||
template<typename Iter,typename T>
|
template<typename Iter,typename T>
|
||||||
Vector operator()(int d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const {
|
Vector operator()(int d,Iter const& f,Iter const& e,T&& t) const {
|
||||||
CGAL_assertion(d==std::distance(f,e)+1);
|
CGAL_assertion(d==std::distance(f,e)+1);
|
||||||
Vector a;
|
Vector a;
|
||||||
a.reserve(d+1);
|
a.reserve(d+1);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#define CGAL_FORWARDABLE(T) T&&
|
|
||||||
#define CGAL_FORWARD(T,t) std::forward<T>(t)
|
#define CGAL_FORWARD(T,t) std::forward<T>(t)
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
#include <boost/preprocessor/repetition.hpp>
|
#include <boost/preprocessor/repetition.hpp>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue