
Rene Rivera <grafik.list@redshift-software.com> writes:
Before I go writing a bunch of code... Is there a way to apply the parameters of an ArgumentPack individually to a function?
What I need/want is to be able, through Boost.MPL, to apply each argument in the ArgumentPack to a single function based of the keyword type. For example:
struct A { template <typename Keyword, typename Value> void SetArgument( Value & v ); };
template <typename ArgPack> void setter( A & a, ArgPack & p ) { // for each arg in p: // a.SetArgument<arg::key_type>(arg.value) }
Or equivalent thereof, without knowing ahead of time what the possible argument keywords and values are. I did some minor looking in the parameter code but didn't see anything obvious that already does this.
It sounds to me like you want a parameter::for_each that can iterate the ArgumentPack. Is that accurate? -- Dave Abrahams Boost Consulting www.boost-consulting.com