on Sat Mar 17 2007, Tobias Schwinger
The problem comes down to that MPL can't know where one placeholder expression starts and where another one ends (denoted by uppercase identifiers, above):
There is an inherent limitation in that regard. These kinds of problems come up repeatedly, so Aleksey and I agree the library should provide a solution. We had a long discussion on the boost-devel list where we talked about the same issues in terms of runtime lambda expressions: http://lists.boost.org/Archives/boost/2005/01/78409.php As I said, this thread is long (it contains a whole thread attached to one message in the outer thread -- how appropriate!) but it's worth a read. Incidentally, protect<> doesn't help as it does something different. -- Dave Abrahams Boost Consulting www.boost-consulting.com