This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78301] noexcept() operator rejects sibling method call without object
- From: "benni.buch at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Feb 2017 11:00:37 +0000
- Subject: [Bug c++/78301] noexcept() operator rejects sibling method call without object
- Auto-submitted: auto-generated
- References: <bug-78301-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78301
--- Comment #3 from Benjamin Buch <benni.buch at gmail dot com> ---
No, it isn't.
$ g++ -std=c++11 -o a a.cpp
a.cpp:3:41: error: invalid use of 'this' at top level
void outer() const noexcept( noexcept( this->inner() ) ) {
tested with:
$ g++ --version
g++ (GCC) 7.0.1 20170221 (experimental)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.