This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/51013] complex::{imag,real}() should maintain lvalue-returning extension in C++11


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 :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]