
8 Nov
2007
8 Nov
'07
8:36 a.m.
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