[result_of] vs function name

Hi, function name is not object. So, I don't know whether function name is lvalue or rvalue. For example, void foo() {} result_of<T_a_func_obj(???)>::type r = a_func_obj(foo); What should ??? be? Regards, -- Shunsuke Sogame

On Feb 7, 2008 11:07 AM, shunsuke <pstade.mb@gmail.com> wrote:
Hi,
function name is not object. So, I don't know whether function name is lvalue or rvalue. For example,
void foo() {} result_of<T_a_func_obj(???)>::type r = a_func_obj(foo);
What should ??? be?
Something like: result_of<T(void(*)())>::type Or if you prefer a reference (not sure about the syntax) result_of<T(void(&)())>::type Note: totaly untested of course :) HTH, -- gpd

Giovanni Piero Deretta wrote:
void foo() {} result_of<T_a_func_obj(???)>::type r = a_func_obj(foo);
What should ??? be?
Something like:
result_of<T(void(*)())>::type
If `&foo` is passed.
Or if you prefer a reference (not sure about the syntax)
result_of<T(void(&)())>::type
I think this is the only choice. I've found: 3.10/2 An lvalue refers to an object or function. So, `foo` must be lvalue!? Regards, -- Shunsuke Sogame
participants (2)
-
Giovanni Piero Deretta
-
shunsuke