Boost logo

Boost :

Subject: Re: [boost] Formal Review Request: TypeErasure
From: Julien Nitard (julien.nitard_at_[hidden])
Date: 2012-06-09 23:09:30


Hi Steven,

While I can use the library just fine in C++98 mode, I am not able to
compile the code (basic.cpp) with -std=c++0x enabled on GCC 4.6.3. The
compilation fails with the following error message :

./boost/type_erasure/detail/vtable.hpp:155:28: error: constexpr static
data member ‘value’ must have an initializer
./boost/type_erasure/detail/vtable.hpp:159:52: error: redeclaration
‘boost::type_erasure::detail::vtable_init<Table, T>::value’ differs in
‘constexpr’
./boost/type_erasure/detail/vtable.hpp:155:28: error: from previous
declaration ‘boost::type_erasure::detail::vtable_init<Table,
T>::value’
./boost/type_erasure/detail/vtable.hpp:159:52: error:
‘boost::type_erasure::detail::vtable_init<Table, T>::value’ declared
‘constexpr’ outside its class
./boost/type_erasure/detail/vtable.hpp:159:52: error: declaration of
‘const Table boost::type_erasure::detail::vtable_init<Table,
T>::value’ outside of class is not definition [-fpermissive]

I tried to improve the situation myself by replacing line 155 by
>> static constexpr Table value(T::value...);

But it didn't help (the given message doesn't make much sense to me :
"T::value is not a type"). Is it a limitation of GCC 4.6 ?

Many thanks,

Julien


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