Subject: Re: [boost] Trouble caused by MPL's metafunction arity limit
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2010-07-20 21:53:20
> 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?
The only suitable workaround for your case would be to define a "proxy"
template with 5 or less parameters specifically for use in MPL lambda
-- Aleksey Gurtovoy MetaCommunications Engineering
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk