
David Abrahams wrote:
Matt Hurd <matt.hurd@gmail.com> writes:
David Abrahams <dave@boost-consulting.com> wrote: Matt Hurd <matt.hurd@gmail.com> writes:
David Abrahams <dave@boost-consulting.com> wrote: Daniel James <daniel@calamity.org.uk> writes:
Sorry, another feature request. Would it be possible/a good idea to add a way to get the type of a named parameter?
Certainly it's possible. Not sure if it's a good idea. Is there a use case? Some people are complaining that the library is already heavy artillery where none is needed.
A use case I have that I'm not sure how best to approach, but would find incredibly useful, with named_params is using a compile time policy to support switching between: 1. direct function call 2. an indirection to the function call, such as the marshalling and transmission of the function parameters, including formal parameter names, to a target.
To do this, named_params needs to support an interface for iterating over the parameters.
Why iterating?
I'd still like to know.
Here's a use case: I'd like to add support for named interfaces in phoenix. This is only possible if I can extract the params' types and values through iteration, or better yet, by packaging them in a tuple. -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net