
----- Mensaje original -----
De: Scott Meyers
Ovanes Markarian wrote:
mpl::insert is an own type but you need the new sequence type with is accessed via: mpl::insert<...>::type
Thanks very much. When I change the corresponding to code to:
typedef mpl::insert
::type BaseClasses; then Base is inserted, but the resulting sequence has only A and Base in it, not A and B and Base, i.e., the type B is somehow being lost. Any idea why?
I think you want to write mpl::end<Constraints>::type
Also, I'll be honest: I don't know when to use ::type and when not to. Is there a good description somewhere (either online or in the MPL book) that will clarify the situation for me?
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. Sort of like the difference between &foo and foo() in the run-time world. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo