
6 Apr
2011
6 Apr
'11
2:48 a.m.
On 4/6/2011 8:01 AM, Steven Watanabe wrote:
1) What is the exact definition of a "placeholder"?
A placeholder is an object or type which is intended to be replaced by another object or type. Some Examples of placeholder objects are _1, _2, etc, used in bind, lambda, and phoenix. Examples of placeholder types are mpl::_1, and boost::recursive_variant_.
In phoenix, it is a placeholder because _this is supposed to be replaced by /this/ when the function is evaluated and /this/ is a valid pointer at eval time. It is uses in, for example, recursive lambda functions. Regards, -- Joel de Guzman http://www.boostpro.com http://boost-spirit.com