This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66256] noexcept evaluation done before end of class


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]