Boost logo

Boost Users :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-05-09 15:47:42

"Stephen Gross" <sgross_at_[hidden]> wrote

> I just found out about the typeof feature in g++. I'm trying to use the
> returned by a boost::bind invocation. Is there any way to make the
> work:
> ===============================
> struct A { int foo(); }

You forgot a semicolon here.

> typedef typeof(boost::bind(A::foo)) my_type;

You might need to supply the return type explicitly, something like:

typedef typeof(boost::bind<int>(A::foo)) my_type;

> ===============================
> So far, g++ just seg faults on me. Am I doing something horribly wrong, or
> is this (more likely) not possible in the first place?

Has to be possible.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at