
JOAQUIN LOPEZ MU?Z wrote:
I think you want to write
mpl::end<Constraints>::type
Thanks for the suggestion, but it doesn't change the behavior of the program: the result of the insertion of a new element into the two-element set is a new set with only two elements (one of the original elements is lost). Please try it and see if you get the same thing I do.
Well, excuse me if the following is obvious to you, but ::type is to a metafunction what actual invocation is to a run-time function. So, mpl::end<Constraints> refers to the name of the entity, but does not actually compute its "return value" unless you add the ::type suffix.
I don't think this always holds. For example, I don't need to add the ::type
suffix when I make a typedef or when I do an assertion:
typedef mpl::set MySet;
BOOST_MPL_ASSERT(( mpl::equal