This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66256] noexcept evaluation done before end of class
- 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: Thu, 09 Mar 2017 13:32:15 +0000
- Subject: [Bug c++/66256] noexcept evaluation done before end of class
- Auto-submitted: auto-generated
- References: <bug-66256-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256
Benjamin Buch <benni.buch at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |benni.buch at gmail dot com
--- Comment #3 from Benjamin Buch <benni.buch at gmail dot com> ---
Same with decltype instead of noexcept:
struct test{
// it only works if e is declared before test()
using type = decltype(e);
static const bool e = false;
};
$ g++ -std=c++11 gcc-bug.cpp
gcc-bug.cpp:3:27: error: 'e' was not declared in this scope
using type = decltype(e);
^
gcc-bug.cpp:3:27: error: 'e' was not declared in this scope
$ 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.