
Version A (works):
template < typename FIELD >
struct rec
{
typename FIELD::type value;
rec() : value() {}
protected:
typename FIELD::type & ref() { return value; }
};
template < typename VEC >
struct generate_record
: boost::mpl::inherit_linearly< VEC, boost::mpl::inherit<
recpl::_2, pl::_1> >::type
{
typedef VEC fields;
};
Version B (fails):
template < typename FIELD, bool Writable >
struct rec
{
typename FIELD::type value; // failure point
rec() : value() {}
protected:
typename FIELD::type & ref() { return value; }
};
template < typename VEC >
struct generate_record
: boost::mpl::inherit_linearly< VEC, boost::mpl::inherit< rec