AMDG Edward Diener wrote:
OK, I understand that placeholder expressions are not evaluated immediately.
What does evaluating an expression immediately have to do with appending '::type' ?
When MPL lambda tries to evaluate the placeholder expression it rips the type apart using template specialization and replaces all instances of the placeholders with the correct arguments. By not using ::type it is possible for mpl::lambda to to work without requiring every metafunction to know about lambda.
leaving the ::type of plus<...> is a shortcut which works for numeric metafunctions.
So is the rule in this regard that numeric metafunctions can be passed around without having to specify '::type' ? If so, what set of MPL metafunctions constitute the numeric matfunctions ?
Basically this shortcut works for any MPL metafunction that always returns an MPL Integral constant.
mpl::inserter is an mpl object rather than an mpl metafunction.
So the rule here is that an mpl 'object' never needs a '::type' since it is already a type ? If so, how do I tell which mpl constructs are mpl 'objects' ?
The only answer I can think of is if something would correspond to a function at runtime than you need the ::type. If it refers to something that would be an object like integral constants and vectors, you don't. If your not sure, the only thing to do is look it up. In Christ, Steven Watanabe