Boost logo

Boost :

Subject: Re: [boost] Problem with BOOST_NO_CXX11_VARIADIC_TEMPLATES in gcc.hpp
From: John Maddock (boost.regex_at_[hidden])
Date: 2014-08-23 04:40:34

> I think I found a problem in config/compiler/gcc.hpp in Boost 1.56.0. I
> was trying to come up with a workaround for a bug having to do with
> variadic templates, when compiling with g++ 4.5.1 (on Linux Fedora 14).
> Modifying line 160 to turn on BOOST_NO_CXX11_VARIADIC_TEMPLATES for g++
> versions earlier than 4.7 had not effect.
> I discovered that the version test in line 160 has no effect, because it
> is in a block (lines 153-164) that only pertains to g++ 4.2 or earlier,
> if compiled with -std=c++0x. The block for versions 4.3 and later
> (lines 145-151) always define BOOST_HAS_VARIADIC_TMPL and never
> BOOST_NO_CXX11_VARIADIC_TEMPLATES. I think that is a mistake, at least
> partially, because proposal N2555 is only supported in version 4.4.

I've just pushed a fix, not sure what happened there.

> At any rate, someone should look at these lines and make some sense of
> them. The GCC support table shows general support for variadic
> templates in 4.3 and support for N2555 (with a long name) in 4.4.
> Furthermore, the bug that produces a message like this:
> "sorry, unimplemented: cannot expand 'Args ...' into a fixed-length
> argument list"
> was only fixed in g++ 4.7.0 (according to a bug report). That issue
> could also use a guard macro, as was done in one of the boost libraries

If this is a GCC specific bug, then I'm inclined to suggest that this is
what BOOST_WORKAROUND is for: unless there are a lot of libraries
needing this, or there's a consensus that variadic templates should be
disabled altogether prior to 4.7?


Boost list run by bdawes at, gregod at, cpdaniel at, john at