[addressof] reference to function?

11 Jul
2006
11 Jul
'06
12:27 p.m.
Hi, void foo() { } void test() { boost::addressof(::foo); } doesn't compile under GCC 3.4.4. What happens? -- Shunsuke Sogame

1:33 p.m.
Peter Dimov wrote:
Shunsuke Sogame wrote:
Hi,
void foo() { }
void test() { boost::addressof(::foo); }
doesn't compile under GCC 3.4.4. What happens?
"Function addressof() returns the address of an object."
foo is not an object.
I see. Well I encountered it while taking address of lambda functors. (type_traits layer will work around it.) Thanks! -- Shunsuke Sogame
6912
Age (days ago)
6912
Last active (days ago)
2 comments
2 participants
participants (2)
-
Peter Dimov
-
Shunsuke Sogame