Boost logo

Boost :

Subject: [boost] Problem with BOOST_NO_CXX11_VARIADIC_TEMPLATES in gcc.hpp
From: Richard Hadsell (hadsell_at_[hidden])
Date: 2014-08-22 17:48:49


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.

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 ( BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST).

-- 
Dick Hadsell			203-992-6320  Fax: 203-992-6001
Reply-to:			hadsell_at_[hidden]
Blue Sky Studioshttp://www.blueskystudios.com
1 American Lane, Greenwich, CT 06831-2560

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