public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dave at boostpro dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52869] New: "this" not being allowed in noexcept clauses Date: Wed, 04 Apr 2012 15:47:00 -0000 [thread overview] Message-ID: <bug-52869-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869 Bug #: 52869 Summary: "this" not being allowed in noexcept clauses Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: dave@boostpro.com Given the following, GCC says: "error: invalid use of 'this' at top level" However, according to [expr.prim.general]/3 'this' should be valid in the exception-specification as it comes after the member function's optional cv-qualifier-seq. #define RETURNS(...) noexcept(noexcept(__VA_ARGS__)) -> decltype(__VA_ARGS__) { return (__VA_ARGS__); } struct mul_ { int operator()() const { return 1; } template <typename A> A operator()(A const & a) const noexcept(A(std::move(a))) { return a; } template <typename A, typename B, typename... C> auto operator()(A const & a, B const & b, C const &... c) const RETURNS((*this)(a * b, c...)) };
next reply other threads:[~2012-04-04 15:47 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-04 15:47 dave at boostpro dot com [this message] 2013-09-18 17:54 ` [Bug c++/52869] [DR 1207] " redi at gcc dot gnu.org 2015-06-07 8:04 ` lz96 at foxmail dot com 2021-05-25 7:42 ` spam+gcc at alt dot ee 2021-05-25 9:02 ` 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-52869-4@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).