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), `<boost/config.hpp>` has a
macro `BOOST_CXX14_CONSTEXPR` that can be either `constexpr` for
fully-C++14 compilers, or empty for non-compliant compilers.
This commit is contained in:
Laurent Rineau 2021-02-09 15:38:08 +01:00
parent 46cb451bde
commit 519870c4cb
1 changed files with 2 additions and 1 deletions

View File

@ -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<T>(args)... } };