[parameter] Interface questions
1. Will BOOST_PARAMETER_IMPL(name) expand to the name of the function that actually "owns" the main body of code? 2. Will there be a way to define a Boost.Parameterized member function outside the class definition? Or should we let the compiler decide whether or not to inline such a function? Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Cromwell Enage wrote:
1. Will BOOST_PARAMETER_IMPL(name) expand to the name of the function that actually "owns" the main body of code?
No, or at least is doesn't at this point.
2. Will there be a way to define a Boost.Parameterized member function outside the class definition? Or should we let the compiler decide whether or not to inline such a function?
It is possible, but it's complicated by the return-type calculation. For example, the expansion-tail of: BOOST_PARAMETER_FUNCTION( (void), f, tag, (required (x, (float)) (optional (y, (float), 0)) ) is something like: template < class ResultType , class Args , class x_type , class y_type
ResultType boost_param_default_21f( ResultType(*)() , Args const& args , x_type& x , y_type& y ) right now. We could improve the name and get rid of the __LINE__ from it, but it's hard (or impossible) to get rid of ResultType argument. -- Daniel Wallin
--- Daniel Wallin wrote:
Cromwell Enage wrote:
1. Will BOOST_PARAMETER_IMPL(name) expand to the name of the function that actually "owns" the main body of code?
No, or at least is doesn't at this point.
Which macro should I use then? For better or for worse, some of my code needs to pass ArgumentPacks directly to other Boost.Parameterized functions.
2. Will there be a way to define a Boost.Parameterized member function outside the class definition? Or should we let the compiler decide whether or not to inline such a function?
It is possible, but it's complicated by the return-type calculation. For example, the expansion-tail of:
BOOST_PARAMETER_FUNCTION( (void), f, tag, (required (x, (float)) (optional (y, (float), 0)) )
is something like:
template < class ResultType , class Args , class x_type , class y_type
ResultType boost_param_default_21f( ResultType(*)() , Args const& args , x_type& x , y_type& y )
right now. We could improve the name and get rid of the __LINE__ from it, but it's hard (or impossible) to get rid of ResultType argument.
That looks painful. It's okay, I don't need this particular feature right now. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Cromwell Enage wrote:
--- Daniel Wallin wrote:
Cromwell Enage wrote:
1. Will BOOST_PARAMETER_IMPL(name) expand to the name of the function that actually "owns" the main body of code? No, or at least is doesn't at this point.
Which macro should I use then? For better or for worse, some of my code needs to pass ArgumentPacks directly to other Boost.Parameterized functions.
Oh, I think I misunderstood what you wanted. BOOST_PARAMETER_IMPL(name) expands to the name of the function that serves as an initial entry-point, accepting an ArgumentPack. That isn't the function that actually owns the main body of code, but I think it's what you want. Correct? -- Daniel Wallin
--- Daniel Wallin wrote:
Cromwell Enage wrote:
--- Daniel Wallin wrote:
Cromwell Enage wrote:
1. Will BOOST_PARAMETER_IMPL(name) expand to the name of the function that actually "owns" the main body of code? No, or at least is doesn't at this point.
Which macro should I use then? For better or for worse, some of my code needs to pass ArgumentPacks directly to other Boost.Parameterized functions.
Oh, I think I misunderstood what you wanted. BOOST_PARAMETER_IMPL(name) expands to the name of the function that serves as an initial entry-point, accepting an ArgumentPack. That isn't the function that actually owns the main body of code, but I think it's what you want. Correct?
Yes, the name of the entry-point function is what I needed, thanks. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
Cromwell Enage
-
Daniel Wallin