| 1 |
// From https://github.com/llvm/llvm-project/issues/77953 |
| 2 |
// RUN: rm -rf %t |
| 3 |
// RUN: mkdir -p %t |
| 4 |
// RUN: split-file %s %t |
| 5 |
|
| 6 |
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm |
| 7 |
// RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm %t/b.cpp -fsyntax-only -verify |
| 8 |
|
| 9 |
//--- a.cppm |
| 10 |
export module a; |
| 11 |
|
| 12 |
template<typename, typename> |
| 13 |
concept c = true; |
| 14 |
|
| 15 |
export template<typename... Ts> |
| 16 |
struct a { |
| 17 |
template<typename... Us> requires(... and c<Ts, Us>) |
| 18 |
friend bool operator==(a, a<Us...>) { |
| 19 |
return true; |
| 20 |
} |
| 21 |
}; |
| 22 |
|
| 23 |
template struct a<>; |
| 24 |
|
| 25 |
//--- b.cpp |
| 26 |
// expected-no-diagnostics |
| 27 |
import a; |
| 28 |
template struct a<int>; |