From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-06-24 12:12:38
Steven Watanabe wrote:
> Can't you use result_of?
As far as I can see, the current boost::result_of implementation doesn't
use decltype or typeof.
I suppose implementing decltype on top of typeof is not a big problem
(you only need to check whether the expression is a reference or not)
however both have problems with mangling when used in a return type, at
least in GCC.
That basically means you can't always rely on them working. I thought
decltype didn't have those mangling problems, looks like it is a regression.
As for the correct way to do that, I suppose it should be possible to
tell boost::result_type with a macro definition to use Boost.Typeof,
which in turn can use either native or emulation.
However range_ex only forwards algorithms and adaptors to Boost.Iterator
and maybe the standard library. Maybe it's these that ought to use
boost::result_of in the first place?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk