Debian Codegraph @

clang/test/Modules/deduction-guide2.cppm

raw
1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/Templ.cppm -emit-module-interface -o %t/Templ.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only
7
8 // RUN: %clang_cc1 -std=c++20 %t/Templ.cppm -emit-reduced-module-interface -o %t/Templ.pcm
9 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only
10
11 //--- Templ.cppm
12 export module Templ;
13 export template <typename T>
14 class Templ {
15 public:
16 Templ(T a) {}
17 };
18
19 template<typename T>
20 Templ(T t) -> Templ<T>;
21
22 //--- Use.cpp
23 // expected-no-diagnostics
24 import Templ;
25 void func() {
26 Templ t(5);
27 }
28