Subject: Re: [boost] [interprocess][move] enum template argument fails to be a valid base class
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-04-22 02:36:50


It's a bug in vector. Change in file

boost/interprocess/containers/container/detail/utilities.hpp

This trait is missing enums:

template<class T>
struct move_const_ref_type
    : if_c
    < ::boost::is_fundamental<T>::value || ::boost::is_pointer<T>::value
    ,const T &
    ,BOOST_INTERPROCESS_CATCH_CONST_RLVALUE(T)
>
{};

So change

::boost::is_fundamental<T>::value || ::boost::is_pointer<T>::value>

So add an include and add also ::boost::is_enum.

#include <boost/type_traits/is_enum.hpp>

//...

::boost::is_fundamental<T>::value || ::boost::is_pointer<T>::value> ||
::boost::is_enum<T>::value>

I can't use is_movable, because that requires the instantiation of the
type and forbids recursive containers, an extra feature for future
Boost.Container candidate. That's why vector needs this workaround.

Best,

Ion