This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51013] complex::{imag,real}() should maintain lvalue-returning extension in C++11
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 08 Nov 2011 15:51:52 +0000
- Subject: [Bug libstdc++/51013] complex::{imag,real}() should maintain lvalue-returning extension in C++11
- Auto-submitted: auto-generated
- References: <bug-51013-4@http.gcc.gnu.org/bugzilla/>
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 :-)