
20 Jul
2010
20 Jul
'10
1:09 a.m.
Hello everyone. I'm working as a student on this year's GSoC and I have ran into a small problem while using MPL in my code. In a nutshell, I have a class template which takes 6 template parameters, and I would like to use it with some MPL algorithms. The problem is, MPL is configured by default to be capable of working with 5 template params only, so lambda expressions of my class won't work with MPL metafunctions. My code is header-only, meaning I cannot (re)define BOOST_MPL_LIMIT_METAFUNCTION_ARITY appropriately, as the MPL headers might have been included before my headers. Out of my 6 template params, 3 are optional, in case this is relevant or can be exploited in any way. Is there any workaround to my problem?