[Bug libstdc++/51013] complex::{imag,real}() should maintain lvalue-returning extension in C++11
marc.glisse at normalesup dot org
gcc-bugzilla@gcc.gnu.org
Tue Nov 8 15:53:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51013
--- Comment #9 from Marc Glisse <marc.glisse at normalesup dot org> 2011-11-08 15:51:52 UTC ---
(In reply to comment #8)
> I meant that with the current libstdc++ complex, this is valid:
>
> constexpr float f = complex<float>(2.4).real();
>
> but adding a non-constexpr overload would cause that one to be selected for the
> call above, making the declaration invalid.
Ah, yes, thank you.
> Once we have ref-qualifiers, it should be OK to add the non-const overload with
> an lvalue ref-qualifier, though.
Assuming we want to provide this extension :-)
More information about the Gcc-bugs
mailing list