Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-11-08 03:36:03


Sergey Shandar wrote:
> References work on gcc-3.4.5 (mingw-special). I have not tried 4.X.X.
> See the test:
> http://tools.assembla.com/cbear/browser/trunk/cbear.berlios.de/cast/test.cpp.
>
> What's wrong with GCC?

You've found that workaround. :-)
Yes, gcc requires a named return value.

Well, my library contains function adaptors.
While adapting, here's what happens internally:

template<class X>
X const & pass_through_some_adaptor(X const & x) { return x; }

D & d = pass_through_some_adaptor(polymorphic_down::ref(b)); // doesn't compile on gcc.

Therefore, I gave up.
Your library might not be affected, though.

Regards,

-- 
Shunsuke Sogame

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk