|
Boost : |
Subject: [boost] [interprocess][move] enum template argument fails to be a valid base class
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-04-21 18:30:05
I have find a possible bug on the move emulation on "
Boost::Container::Vector with Enum Template Argument - Not Legal Base Class" http://stackoverflow.com/questions/2678476/boostcontainervector-with-enum-template-argument-not-legal-base-class
As rv inherits from the movable class
template <class T>
class rv : public T
{
rv();
~rv();
rv(rv const&);
void operator=(rv const&);
};
it doesn't works for enum types. With gcc 3.4. I get
../../../boost/interprocess/detail/move.hpp:79: error: base type `Test::Types' fails to be a struct or class type.
I don't know if this is a know issue with the move emulation.
I have tried to add a specialization for is_movable
namespace boost {
namespace interprocess { // get inside boost
template<>
class is_movable<Test::Types> // add custom specialization of is_movable
: public mpl::bool_<false>
{};
}}
but this doesn't works neither. I have tried to specialize the rv template with
template <>
class rv<Test::Types>
{
Test::Types v;
rv();
~rv();
rv(rv const&);
void operator=(rv const&);
operator Test::Types() const {return v;}
};
and it compiles but the execution fails.
Is there any workaround to this issue or better yet a generic solution?
Best,
_____________________
Vicente Juan Botet Escribá
http://viboes.blogspot.com/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk