https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89600
Bug ID: 89600
Summary: rejects-valid on dependent block-scope using
declaration
Product: gcc
Version: unknown
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: ---
GCC rejects this valid code:
template<typename T> T f() { using T::Bar; return Bar; }
As follows:
<source>: In function 'T f()':
<source>:2:39: error: 'T' is not a namespace or unscoped enum
2 | template<typename T> T f() { using T::Bar; return Bar; }
| ^~~
... which is wrong; T could be an unscoped enumeration:
enum E { Bar };
E e = f<E>();