From 82c13e6e74aafa172b65f9ef60a8bc3879ed02f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2019 13:47:58 +0100 Subject: [PATCH] remove cpp11 workaround in kernel related packages --- .../Bitstream_descartes_E08_tree.h | 2 - .../Bitstream_descartes_rndl_tree.h | 2 - .../Circular_kernel_2/Intersection_traits.h | 24 +- .../Circular_kernel_3/Intersection_traits.h | 24 +- .../include/CGAL/Filtered_predicate.h | 305 ----------------- .../CGAL/Filtered_predicate_with_state.h | 312 ------------------ .../include/CGAL/Robust_construction.h | 72 ---- .../Intersections_2/variant_any_object.cpp | 4 - .../include/CGAL/Intersection_traits.h | 24 +- Kernel_23/include/CGAL/basic.h | 3 - .../Kernel_23/include/CGAL/_test_cls_object.h | 2 - .../include/CGAL/Polynomial/Polynomial_type.h | 2 - Property_map/include/CGAL/property_map.h | 3 - Stream_support/include/CGAL/IO/io_tags.h | 2 - 14 files changed, 18 insertions(+), 763 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index d6f0e659ce0..c99b9c4905f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -476,9 +476,7 @@ private: log_C_eps_ = n.log_C_eps_; } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Self& operator= (const Self&) = delete; -#endif }; // struct Bitstream_descartes_E08_node diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 5fc1321d51f..ab338ae6243 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -567,9 +567,7 @@ private: log_C_eps_ = n.log_C_eps_; } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Self& operator= (const Self&)=delete; -#endif }; // struct Bitstream_descartes_rndl_node diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h index 537332f2a04..5bda0413e7f 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h @@ -209,28 +209,16 @@ namespace internal{ // the real type. // Overloads for empty returns are also provided. #if CGAL_INTERSECTION_VERSION < 2 - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline - CGAL::Object ck2_intersection_return(const T& t) { return CGAL::make_object(t); } - #else - template - inline - CGAL::Object ck2_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline + CGAL::Object ck2_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } template inline CGAL::Object ck2_intersection_return() { return CGAL::Object(); } #else - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline RT - ck2_intersection_return(const T& t) { return RT(t); } - #else - template - inline RT - ck2_intersection_return(T&& t) { return RT(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline RT + ck2_intersection_return(T&& t) { return RT(std::forward(t)); } template inline RT ck2_intersection_return() { return RT(); } diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h index 4a690b64562..f01a0ecd327 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h @@ -201,28 +201,16 @@ namespace internal{ // the real type. // Overloads for empty returns are also provided. #if CGAL_INTERSECTION_VERSION < 2 - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline - CGAL::Object sk3_intersection_return(const T& t) { return CGAL::make_object(t); } - #else - template - inline - CGAL::Object sk3_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline + CGAL::Object sk3_intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } template inline CGAL::Object sk3_intersection_return() { return CGAL::Object(); } #else - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline RT - sk3_intersection_return(const T& t) { return RT(t); } - #else - template - inline RT - sk3_intersection_return(T&& t) { return RT(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline RT + sk3_intersection_return(T&& t) { return RT(std::forward(t)); } template inline RT sk3_intersection_return() { return RT(); } diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index f11a7b9a7b8..d9002ca0318 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -87,72 +87,11 @@ public: : ep(e), ap(a) {} - -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template result_type operator()(const Args&... args) const; -#else - - template - result_type - operator()(const A1 &a1) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9, const A10 &a10) const; - - // Idem for more than 10 arguments. Do it on demand. - -#endif }; -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - template template typename Filtered_predicate::result_type @@ -176,250 +115,6 @@ Filtered_predicate:: return ep(c2e(args)...); } -#else - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - - Ares res = ap(c2a(a1)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7), c2a(a8)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7), - c2e(a8)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7), c2a(a8), c2a(a9)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7), - c2e(a8), c2e(a9)); -} - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9, const A10 &a10) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7), c2a(a8), c2a(a9), c2a(a10)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7), - c2e(a8), c2e(a9), c2e(a10)); -} - -#endif - } //namespace CGAL #endif // CGAL_FILTERED_PREDICATE_H diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h b/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h index 5a813fcd608..10ebc4efaec 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h @@ -58,70 +58,11 @@ public: : c2e(), c2a(), o1(o1), oep(), ap(c2a(o1)) {} -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template result_type operator()(const Args&... args) const; -#else - - template - result_type - operator()(const A1 &a1) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9) const; - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9, const A10 &a10) const; - - // Idem for more than 10 arguments. Do it on demand. - -#endif }; -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template template typename Filtered_predicate_with_state::result_type @@ -152,259 +93,6 @@ Filtered_predicate_with_state:: return (*oep)(c2e(args)...); } -#else - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - - Ares res = ap(c2a(a1)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(!oep) oep = EP(c2e(o1)); - return *oep(c2e(a1)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(! oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(!oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2), c2e(a3)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(! oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2), c2e(a3), c2e(a4)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(!oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(!oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - return ep(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7), c2a(a8)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(!oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7), - c2e(a8)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7), c2a(a8), c2a(a9)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(!oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7), - c2e(a8), c2e(a9)); -} - -template - template -typename Filtered_predicate_with_state::result_type -Filtered_predicate_with_state:: - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9, const A10 &a10) const -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding p; - try - { - Ares res = ap(c2a(a1), c2a(a2), c2a(a3), c2a(a4), c2a(a5), c2a(a6), - c2a(a7), c2a(a8), c2a(a9), c2a(a10)); - if (is_certain(res)) - return get_certain(res); - } - catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); - if(!oep) oep = EP(c2e(o1)); - return (*oep)(c2e(a1), c2e(a2), c2e(a3), c2e(a4), c2e(a5), c2e(a6), c2e(a7), - c2e(a8), c2e(a9), c2e(a10)); -} - -#endif - } //namespace CGAL #endif // CGAL_FILTERED_PREDICATE_WITH_STATE_H diff --git a/Filtered_kernel/include/CGAL/Robust_construction.h b/Filtered_kernel/include/CGAL/Robust_construction.h index 40ad9072c49..f1887f1d198 100644 --- a/Filtered_kernel/include/CGAL/Robust_construction.h +++ b/Filtered_kernel/include/CGAL/Robust_construction.h @@ -59,82 +59,10 @@ public: typedef A2E Approximate_to_exact_converter; typedef E2A Exact_to_approximate_converter; -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template result_type operator()(const Args&... args) const { return e2a(ec(a2e(args)...)); } -#else - - template - result_type - operator()(const A1 &a1) const - { return e2a(ec(a2e(a1))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2) const - { return e2a(ec(a2e(a1), a2e(a2))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3), a2e(a4))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3), a2e(a4), a2e(a5))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3), a2e(a4), a2e(a5), a2e(a6))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3), a2e(a4), a2e(a5), - a2e(a6), a2e(a7))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3), a2e(a4), a2e(a5), - a2e(a6), a2e(a7), a2e(a8))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3), a2e(a4), a2e(a5), - a2e(a6), a2e(a7), a2e(a8), a2e(a9))); } - - template - result_type - operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, - const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, - const A9 &a9, const A10 &a10) const - { return e2a(ec(a2e(a1), a2e(a2), a2e(a3), a2e(a4), a2e(a5), - a2e(a6), a2e(a7), a2e(a8), a2e(a9), a2e(a10))); } - - // Idem for more than 10 arguments. Do it on demand (or use C++0x). - -#endif }; } //namespace CGAL diff --git a/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp b/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp index cca0ff3e2ab..0b9f846cd5a 100644 --- a/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp +++ b/Intersections_2/benchmark/Intersections_2/variant_any_object.cpp @@ -16,11 +16,9 @@ #include #include -#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_TUPLE) #include #include #include -#endif // Intersection_traits template @@ -208,7 +206,6 @@ struct Do_f : Vec_holder { } }; -#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_TUPLE) cpp0x::tuple intersect_each_variant_overload(const Vector& segs) { cpp0x::tuple ret = cpp0x::make_tuple(0, 0, 0); typedef Intersection_traits Traits; @@ -236,7 +233,6 @@ cpp0x::tuple intersect_each_variant_overload(const Vector& segs) return ret; } -#endif int main(int argc, char* argv[]) { int repeats = 100; diff --git a/Intersections_2/include/CGAL/Intersection_traits.h b/Intersections_2/include/CGAL/Intersection_traits.h index 3b751bc5c73..168bf5d8df4 100644 --- a/Intersections_2/include/CGAL/Intersection_traits.h +++ b/Intersections_2/include/CGAL/Intersection_traits.h @@ -158,28 +158,16 @@ namespace internal { // the real type. // Overloads for empty returns are also provided. #if CGAL_INTERSECTION_VERSION < 2 - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline - CGAL::Object intersection_return(const T& t) { return CGAL::make_object(t); } - #else - template - inline - CGAL::Object intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline + CGAL::Object intersection_return(T&& t) { return CGAL::make_object(std::forward(t)); } template inline CGAL::Object intersection_return() { return CGAL::Object(); } #else -#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) - template - inline typename cpp11::result_of::type - intersection_return(const T& t) { return typename cpp11::result_of::type(t); } - #else - template - inline typename cpp11::result_of::type - intersection_return(T&& t) { return typename cpp11::result_of::type(std::forward(t)); } - #endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE + template + inline typename cpp11::result_of::type + intersection_return(T&& t) { return typename cpp11::result_of::type(std::forward(t)); } template inline typename cpp11::result_of::type intersection_return() { return typename cpp11::result_of::type(); } diff --git a/Kernel_23/include/CGAL/basic.h b/Kernel_23/include/CGAL/basic.h index 682b37bdcd6..6f3e7fb917d 100644 --- a/Kernel_23/include/CGAL/basic.h +++ b/Kernel_23/include/CGAL/basic.h @@ -35,9 +35,6 @@ // This cannot be disabled for now until we have a clear idea which // compilers implement N3276. -// #if !defined(CGAL_CFG_NO_CPP0X_DECLTYPE) -// #define BOOST_RESULT_OF_USE_DECLTYPE -// #endif #include #include diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h index 4225c9233db..01b286378ca 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h @@ -40,10 +40,8 @@ public: Object_handle(const CGAL::Object& o) : Base(o) {} Object_handle(const Object_handle& h) : Base(h) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Object_handle& operator=(const Object_handle& v)=default; -#endif }; Object_handle return_obj() diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index 62f9e46287c..0c6e236824c 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -362,10 +362,8 @@ public: { reduce(); simplify_coefficients(); } #endif // defined(CGAL_USE_LEDA) || defined(DOXYGEN_RUNNING) -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Polynomial& operator=(const Polynomial& p)=default; -#endif // // Public member functions diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index fc320cc7160..45e6a242a05 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -342,7 +342,6 @@ struct Nth_of_tuple_property_map /// @} }; -#ifndef CGAL_CFG_NO_CPP0X_TUPLE template struct Nth_of_tuple_property_map > { @@ -358,8 +357,6 @@ struct Nth_of_tuple_property_map > friend reference get(const Self&,const key_type& k) {return std::get(k);} friend void put(const Self&,key_type& k, const value_type& v) {std::get(k)=v;} }; -#endif - /// Free function to create a Nth_of_tuple_property_map property map. /// diff --git a/Stream_support/include/CGAL/IO/io_tags.h b/Stream_support/include/CGAL/IO/io_tags.h index 142b78092c6..5b101c665d3 100644 --- a/Stream_support/include/CGAL/IO/io_tags.h +++ b/Stream_support/include/CGAL/IO/io_tags.h @@ -53,10 +53,8 @@ template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; -#ifndef CGAL_CFG_NO_CPP0X_LONG_LONG template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; -#endif template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; };