From 235b601b73fa2253f06e88c84e9c92cf7cc3a33c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 22 Jan 2016 12:26:48 +0100 Subject: [PATCH] Fix a bug in Boost.Config<1.57 with gcc>=5.0 `BOOST_HAS_VARIADIC_TMPL` and `BOOST_NO_CXX11_VARIADIC_TEMPLATES` can be wrong, with Boost-1.57 and gcc>=5.0. Fixes the following warnings with gcc>=5.0 in C++98 mode: > CGAL-4.8-Ic-106/include/CGAL/array.h:78:31: warning: variadic templates only available with -std=c++11 or -std=gnu++11 > template< typename T, typename... Args > > ^ > CGAL-4.8-Ic-106/include/CGAL/array.h:80:28: warning: variadic templates only available with -std=c++11 or -std=gnu++11 > cpp11::array< T, 1 + sizeof...(Args) > > ^ > CGAL-4.8-Ic-106/include/CGAL/array.h:81:42: warning: variadic templates only available with -std=c++11 or -std=gnu++11 > make_array(const T & t, const Args & ... args) > ^ --- 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 47bbad9024d..6cdebb37879 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -85,6 +85,14 @@ #include #include +// bug-fix for g++-5.x and Boost.Config<1.57 +// https://svn.boost.org/trac/boost/ticket/10500 +#if BOOST_VERSION < 105700 && BOOST_GCC < 60000 && \ + ! defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(BOOST_HAS_VARIADIC_TMPL) +# undef BOOST_HAS_VARIADIC_TMPL +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + #include //----------------------------------------------------------------------//