llvm-project/clang/test/SemaCXX/rounding-math-crash.cpp
Nicolas Lesser 4848f3bf2f [C++2a] P0634r3: Down with typename!
This patch implements P0634r3 that removes the need for 'typename' in certain contexts.

For example,

```
template <typename T>
using foo = T::type; // ok
```

This is also allowed in previous language versions as an extension, because I think it's pretty useful. :)

Reviewed By: #clang-language-wg, erichkeane

Differential Revision: https://reviews.llvm.org/D53847
2022-09-28 09:50:19 -07:00

6 lines
228 B
C++

// RUN: %clang_cc1 -triple x86_64-linux -fsyntax-only -frounding-math -verify %s
template <class b> b::a() {}
// expected-warning@-1 {{implicit 'typename' is a C++20 extension}}
// expected-error@-2 {{expected unqualified-id}}