
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< rec<pl::_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<pl::_2, true>, pl::_1> >::type { typedef VEC fields; }; The error I get: 'type' : is not a member of 'boost::mpl::arg<2>' I think I know what's going on, rec<pl::_2, true> is getting immediately instantiated while rec<pl::_2> does not. What I don't know is why or how to fix it. Thanks.