https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81895
Bug ID: 81895
Summary: gcc rejects out-of-line definition of enum member of
class template under -pedantic-errors
Product: gcc
Version: 7.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
Target Milestone: ---
g++ -std=c++11 -pedantic-errors has a rejects-valid on this:
template<typename T> struct S { enum class E : int; };
template<typename T> enum class S<T>::E : int { e };
S<char>::E x = S<char>::E::e;
The bogus error is:
error: 'enum S<T>::E' is an enumeration template [-Wpedantic]