[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / PCH / cxx2a-constraints-crash.cpp
blob637c55f0c879c938b2d0844048589e56627ce0fc
1 // RUN: %clang_cc1 -std=c++2a -emit-pch %s -o %t
2 // RUN: %clang_cc1 -std=c++2a -include-pch %t -verify %s
4 // expected-no-diagnostics
6 #ifndef HEADER
7 #define HEADER
9 template <typename T, typename U>
10 concept not_same_as = true;
12 template <int Kind>
13 struct subrange {
14 template <not_same_as<int> R>
15 subrange(R) requires(Kind == 0);
17 template <not_same_as<int> R>
18 subrange(R) requires(Kind != 0);
21 template <typename R>
22 subrange(R) -> subrange<42>;
24 int main() {
25 int c;
26 subrange s(c);
29 #endif