https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Benjamin Buch from comment #3) > 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; > }; This code is not valid, GCC is correct to give an error.