http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52765
--- Comment #1 from christophe.lyon at st dot com 2012-03-29 09:19:30 UTC ---
If you look at libstdc++-v3/include/std/complex:
[...]
#ifdef __GXX_EXPERIMENTAL_CXX0X__
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
constexpr _Tp
real() const { return _M_real; }
[...]
#else
[...]
/// Return real part of complex number.
const _Tp&
real() const { return _M_real; }
[...]
#endif
You can see that depending of __GXX_EXPERIMENTAL_CXX0X__ (automatically defined
with -std=c++0x), the type of the value returned by real() is different.