https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92707
Bug ID: 92707
Summary: type alias on type alias on lambda in unevaluated
context does not work
Product: gcc
Version: 9.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vanyacpp at gmail dot com
Target Milestone: ---
GCC shows an error on this code:
template <typename T>
using foo = decltype([] {});
template <typename U>
using bar = foo<U>;
extern foo<int> a;
extern bar<int> a; // error: 'bar' does not name a type
The error is wrong because bar is a regular type alias. Clearly it names a
type.
If I replace the lambda with an integer the error goes away.