mirror of https://github.com/CGAL/cgal
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:
parent
46cb451bde
commit
519870c4cb
|
|
@ -46,7 +46,8 @@ namespace CGAL {
|
||||||
// It's also untrue that this is not documented... It is !
|
// It's also untrue that this is not documented... It is !
|
||||||
|
|
||||||
template< typename T, typename... Args >
|
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)
|
make_array(const T & t, const Args & ... args)
|
||||||
{
|
{
|
||||||
std::array< T, 1 + sizeof...(Args) > a = { { t, static_cast<T>(args)... } };
|
std::array< T, 1 + sizeof...(Args) > a = { { t, static_cast<T>(args)... } };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue