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
./boost/type_erasure/detail/vtable.hpp:155:28: error: from previous
declaration ‘boost::type_erasure::detail::vtable_init<Table,
./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,


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