brintos

brintos / llvm-project-archived public Read only

0
0
Text · 693 B · 5c54ba4 Raw
37 lines · cpp
1// RUN: %clang_cc1 -std=c++2a -fallow-pch-with-compiler-errors -emit-pch -o %t %s -verify2// RUN: %clang_cc1 -std=c++2a -fallow-pch-with-compiler-errors -include-pch %t %s -verify3 4#ifndef HEADER5#define HEADER6 7template <typename T, typename U>8concept not_same_as = true;9 10template <int Kind>11struct subrange {12  template <not_same_as<int> R>13  subrange(R) requires(Kind == 0);14 15  template <not_same_as<int> R>16  subrange(R) requires(Kind != 0);17};18 19template <typename R>20subrange(R) -> subrange<42>;21 22int main() {23  int c;24  subrange s(c);25}26 27#endif28 29namespace GH99036 {30 31template <typename T>32concept C; // expected-error {{expected '='}}33 34template <C U> void f();35 36} // namespace GH9903637