
18 Jul
2004
18 Jul
'04
1:19 a.m.
"Scott Graham" <sgraham@gmail.com> writes:
Hi
Is it possible to make mpl::at_c lambda-able?
I'm afraid not. Lambda requires a uniform interface to metafunctions. That's a big part of why the sample chapter 3 at http://boost-consulting.com/mplbook/ goes on and on about the importance of polymorphism. Getting lambda to work with template arguments other than types would require an exponential number of template specializations, and getting it to work with *all* possible non-type template arguments, even just for one-argument templates, would require an infinite number of template specializations. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com