public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marc.glisse at normalesup dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/51013] complex::{imag,real}() should maintain lvalue-returning extension in C++11 Date: Mon, 07 Nov 2011 23:48:00 -0000 [thread overview] Message-ID: <bug-51013-4-CrOEKJcr0h@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51013-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51013 Marc Glisse <marc.glisse at normalesup dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc.glisse at normalesup | |dot org --- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> 2011-11-07 23:42:46 UTC --- (In reply to comment #1) > I did *not* *remove* anything, simply, for C++11, real() and imag() are exactly > *per the letter* of the Standard, that is (similarly for the specializations): > > constexpr _Tp > real() const { return _M_real; } Isn't the const redundant here? Actually, I only see constexpr for the specializations in the standard, not for the general case, am I looking at the wrong place? > constexpr _Tp > imag() const { return _M_imag; } > > and I don't see why we should do something different. But, if Gaby thinks, > everything considered, that we want something different, I'm not going to > object to patches to that effect (from a technical point of view, note the > functions are now constexpr, thus you can't simply have two overloads anymore) Why can't you still have these overloads? constexpr _Tp real(); // const _Tp&real(); Note that I am not taking position on whether it should be added, I am just confused by the technical reasons.
next prev parent reply other threads:[~2011-11-07 23:43 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-07 21:10 [Bug libstdc++/51013] New: " jyasskin at gcc dot gnu.org 2011-11-07 21:11 ` [Bug libstdc++/51013] " paolo.carlini at oracle dot com 2011-11-07 23:48 ` marc.glisse at normalesup dot org [this message] 2011-11-08 0:11 ` paolo.carlini at oracle dot com 2011-11-08 0:30 ` paolo.carlini at oracle dot com 2011-11-08 1:11 ` jason at gcc dot gnu.org 2011-11-08 7:47 ` marc.glisse at normalesup dot org 2011-11-08 8:13 ` paolo.carlini at oracle dot com 2011-11-08 15:20 ` jason at gcc dot gnu.org 2011-11-08 15:53 ` marc.glisse at normalesup dot org 2011-11-08 18:36 ` daniel.kruegler at googlemail dot com 2011-11-08 18:49 ` marc.glisse at normalesup dot org 2011-11-09 10:42 ` daniel.kruegler at googlemail dot com 2013-07-11 15:03 ` glisse at gcc dot gnu.org 2015-09-06 18:09 ` ross.martin at ieee dot org 2015-09-06 18:45 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-51013-4-CrOEKJcr0h@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).