
On 01/06/2005 02:29 PM, David Abrahams wrote:
* ... your ideas here ... :)
I've had some trouble understanding how placeholders and lambda expressions work. Specifically, I've wondered why, when a template is instantiated with _1, _2, ..., that the instantiation doesn't produce some sort of error messages. For instance, if the template requires one of its arguments to satisfy some requirement, then how could _1 or _2 satisfy such a requirement since they couldn't know about it? Then I'm wondering about the complexity when the lambda is applied to an argument. Wouldn't each _1 have to be replaced by the actual argument, and wouldn't this require somehow parsing the template expression? I'm thinking I'll have to experiment to see how it's done. I have looked a little at the code but I can't figure it out yet. Maybe you're audience, if they're similarly curious, would like to have those questions answered.