From ca90296877d9fe8da77ebb6697642ca05dc14bc7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 26 Apr 2024 14:48:19 +0200 Subject: [PATCH] macros to support C++20 concepts conditionally (used in CDT_3 only, for the moment) --- Installation/include/CGAL/config.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 6a84c8c4d5e..4faa6ad4843 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -476,6 +476,14 @@ namespace cpp11{ }//namespace cpp11 } //namespace CGAL +#if __cpp_lib_concepts >= 201806L +# define CGAL_CPP20_REQUIRE_CLAUSE(x) requires x +# define CGAL_TYPE_CONSTRAINT(x) x +#else +# define CGAL_CPP20_REQUIRE_CLAUSE(x) +# define CGAL_TYPE_CONSTRAINT(x) typename +#endif + // The fallthrough attribute // See for clang: // https://clang.llvm.org/docs/AttributeReference.html#statement-attributes