public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mmehlich at semanticdesigns dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64232] Derived class with implicitly declared assignment operator is std::is_assignable though base class is not std::is_assignable Date: Tue, 09 Dec 2014 21:49:00 -0000 [thread overview] Message-ID: <bug-64232-4-Prd7DkRKod@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64232-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64232 --- Comment #2 from Michael Mehlich <mmehlich at semanticdesigns dot com> --- My expectation was that the compiler declares the copy assignment operator of Y as deleted as its base class X is not assignable; std::is_assignable would then just have to look at the copy constructor for Y and notice that it is deleted, which would obviously be in the immediate context. But arguably, 12.8 paragraph 34 item 4 only looks at the copy assignment operator for X, not whether X can actually be copy-assigned, which - as the example above shows - may require that the copy constructor for X is not deleted. By the way, std::is_nothrow_assign has the same problem (i.e. declaring X(const X&) as throwing, and operator=(X x) as not throwing results in gcc claiming that the copy assignment operator for Y is not throwing).
prev parent reply other threads:[~2014-12-09 21:49 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-12-09 1:53 [Bug c++/64232] New: Derived class with implicitly declared assignment operator is std::assignable though base class is not std::assignable mmehlich at semanticdesigns dot com 2014-12-09 12:09 ` [Bug c++/64232] Derived class with implicitly declared assignment operator is std::is_assignable though base class is not std::is_assignable redi at gcc dot gnu.org 2014-12-09 21:49 ` mmehlich at semanticdesigns dot com [this message]
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-64232-4-Prd7DkRKod@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).