From 519870c4cbf6d04ee6931f0f8b8680940bd61e33 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Feb 2021 15:38:08 +0100 Subject: [PATCH] Add support for MSVC 2015 MSVC 2015 has a partial support for C++14, and in particular for C++14 `constexpr` functions. Since Boost-1.57 (that is the minimal requirement for CGAL since version 5.0), `` has a macro `BOOST_CXX14_CONSTEXPR` that can be either `constexpr` for fully-C++14 compilers, or empty for non-compliant compilers. --- STL_Extension/include/CGAL/array.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index 5a80d1335fe..1693c6994e8 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -46,7 +46,8 @@ namespace CGAL { // It's also untrue that this is not documented... It is ! template< typename T, typename... Args > -constexpr std::array< T, 1 + sizeof...(Args) > +BOOST_CXX14_CONSTEXPR +std::array< T, 1 + sizeof...(Args) > make_array(const T & t, const Args & ... args) { std::array< T, 1 + sizeof...(Args) > a = { { t, static_cast(args)... } };