Boost logo

Boost :

Subject: Re: [boost] [Boost.Config] variadic templates availiable with GCC 5 in C++03 mode
From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2014-09-23 16:46:30


(resent due to missing membership on boost list)

On 23 September 2014 22:43, Lars Gullik Bjønnes <larsbj_at_[hidden]> wrote:
> Hi,
>
> It seems that the checking to define BOOST_NO_CXX11_VARIADIC_TEMPLATES or not
> is slightly wrong when __GNUC__ > 4 (in this case __GNUC__ == 5)
>
> This was tried fixed in [SVN r70019], but it looks like the fix was
> wrong for __GNUC__ > 4.
>
> (git 050da29d47ce43b1dca6bed03d54c40d5e3d315e)
>
>
> This is the current code:
>
> // Variadic templates compiler:
> // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
> # if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ ==
> 4) && \ (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
> # define BOOST_HAS_VARIADIC_TMPL
> # else
> # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
> # endif
> #endif
>
>
> This is my proposed fix:
>
> diff --git a/functional/boost/boost/config/compiler/gcc.hpp
> b/functional/boost/boost/config/compiler/gcc.hpp
> index ef6b07e..736e8ba 100644
> --- a/functional/boost/boost/config/compiler/gcc.hpp
> +++ b/functional/boost/boost/config/compiler/gcc.hpp
> @@ -157,7 +157,7 @@
>
> // Variadic templates compiler:
> // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
> -# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__
> == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
> +# if defined(__VARIADIC_TEMPLATES) || ((__GNUC__ > 4 || (__GNUC__ ==
> 4 && __GNUC_MINOR__ >= 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
> # define BOOST_HAS_VARIADIC_TMPL
> # else
> # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
>
>
> (I'll post a none-damaged diff if wanted.)
>
> --
> Lgb

-- 
        Lgb

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk