[container] variadic template support in g++ 4.5.1
I am trying to compile some of our code with Boost 1.56.0 on a Linux (Fedora 14) platform with this compiler: gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) I apologize for using this ancient version of g++, but we're stuck with it for a while longer. I get this error message: In file included from .../boost/circular_buffer/details.hpp:19:0, from .../boost/circular_buffer.hpp:56, from ...: /netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp: In static member function 'static void boost::container::allocator_traits<Alloc>::priv_construct(boost::false_type, Alloc&, T*, const Args& ...)': /netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp:324:43: sorry, unimplemented: cannot expand 'Args ...' into a fixed-length argument list /netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp:325:51: error: 'value' is not a valid template argument for type 'bool' because it is a non-constant expression /netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp:325:57: error: invalid type in declaration before ';' token Line 324 is in a block guarded by: #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) config/compiler/gcc.hpp defines BOOST_NO_CXX11_VARIADIC_TEMPLATES for g++ earlier than 4.4, which means it believes the code should be valid for 4.5.1. Is there already a fix for this in development? Please, tell me what to do with my copy of 1.56.0. -- Dick Hadsell 203-992-6320 Fax: 203-992-6001 Reply-to: hadsell@blueskystudios.com Blue Sky Studios http://www.blueskystudios.com 1 American Lane, Greenwich, CT 06831-2560
On 08/20/2014 11:40 AM, Richard Hadsell wrote:
/netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp: In static member function 'static void boost::container::allocator_traits<Alloc>::priv_construct(boost::false_type, Alloc&, T*, const Args& ...)': /netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp:324:43: sorry, unimplemented: cannot expand 'Args ...' into a fixed-length argument list ... config/compiler/gcc.hpp defines BOOST_NO_CXX11_VARIADIC_TEMPLATES for g++ earlier than 4.4, which means it believes the code should be valid for 4.5.1.
Is there already a fix for this in development? Please, tell me what to do with my copy of 1.56.0.
Further research found this g++ bug ticket, which says that it is fixed in 4.7.0: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35722 -- Dick Hadsell 203-992-6320 Fax: 203-992-6001 Reply-to: hadsell@blueskystudios.com Blue Sky Studios http://www.blueskystudios.com 1 American Lane, Greenwich, CT 06831-2560
El 20/08/2014 17:53, Richard Hadsell escribió:
On 08/20/2014 11:40 AM, Richard Hadsell wrote:
/netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp: In static member function 'static void boost::container::allocator_traits<Alloc>::priv_construct(boost::false_type, Alloc&, T*, const Args& ...)': /netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp:324:43: sorry, unimplemented: cannot expand 'Args ...' into a fixed-length argument list ... config/compiler/gcc.hpp defines BOOST_NO_CXX11_VARIADIC_TEMPLATES for g++ earlier than 4.4, which means it believes the code should be valid for 4.5.1.
Is there already a fix for this in development? Please, tell me what to do with my copy of 1.56.0.
Further research found this g++ bug ticket, which says that it is fixed in 4.7.0:
Boost.Container has some workaround for some case (search for BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST). I think the workaround should go to Boost.Intrusive, which implements the class (has_member_function_callable_with_xxxx). Can you please try to write a small test case showing the problem and fill a Boost track issue? Thanks, Ion
On 08/20/2014 01:51 PM, Ion Gaztañaga wrote:
El 20/08/2014 17:53, Richard Hadsell escribió:
On 08/20/2014 11:40 AM, Richard Hadsell wrote:
/netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp: In static member function 'static void boost::container::allocator_traits<Alloc>::priv_construct(boost::false_type, Alloc&, T*, const Args& ...)': /netDISKS/master/netmt/LINUX_INTF14/cgi/boost/1.56.0/Include/libboost/boost/container/allocator_traits.hpp:324:43: sorry, unimplemented: cannot expand 'Args ...' into a fixed-length argument list ... config/compiler/gcc.hpp defines BOOST_NO_CXX11_VARIADIC_TEMPLATES for g++ earlier than 4.4, which means it believes the code should be valid for 4.5.1.
Is there already a fix for this in development? Please, tell me what to do with my copy of 1.56.0.
Further research found this g++ bug ticket, which says that it is fixed in 4.7.0:
Boost.Container has some workaround for some case (search for BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST). I think the workaround should go to Boost.Intrusive, which implements the class (has_member_function_callable_with_xxxx).
Can you please try to write a small test case showing the problem and fill a Boost track issue?
Thanks,
Ion When I tried to submit a bug ticket, it was rejected, because I included links to 2 g++ bugzilla tickets. Then it threw away all that I had typed, which I don't wish to do again.
You only need this one line to reproduce the problem:
#include
On 08/20/2014 02:31 PM, Richard Hadsell wrote:
On 08/20/2014 01:51 PM, Ion Gaztañaga wrote:
Boost.Container has some workaround for some case (search for BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST). I think the workaround should go to Boost.Intrusive, which implements the class (has_member_function_callable_with_xxxx).
Can you please try to write a small test case showing the problem and fill a Boost track issue?
Thanks,
Ion When I tried to submit a bug ticket, it was rejected, because I included links to 2 g++ bugzilla tickets. Then it threw away all that I had typed, which I don't wish to do again.
You only need this one line to reproduce the problem:
#include
When you determine how to fix this problem, please let me know, so that I can apply it to my 1.56.0. I understand that BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST is the appropriate guard macro to use, but I have no idea what the alternate code would be. Until I get the whole fix, I can't start using 1.56.0. If you can't test your fix on a g++ version earlier than 4.7.0, I would be glad to test it for you. -- Dick Hadsell 203-992-6320 Fax: 203-992-6001 Reply-to: hadsell@blueskystudios.com Blue Sky Studios http://www.blueskystudios.com 1 American Lane, Greenwich, CT 06831-2560
participants (2)
-
Ion Gaztañaga
-
Richard Hadsell