1 // RUN: rm -rf %t 2 // RUN: mkdir -p %t 3 // RUN: split-file %s %t 4 // 5 // RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-module-interface -o %t/B.pcm 6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify 7 // 8 //--- templ.h 9 template <typename T, typename U = T> 10 class templ {}; 11 template <typename T, typename U = void> templ_func()12void templ_func() {} 13 14 //--- B.cppm 15 module; 16 #include "templ.h" 17 export module B; 18 export template <typename G> bar()19templ<G> bar() { 20 templ_func<G>(); 21 return {}; 22 } 23 24 //--- Use.cpp 25 // expected-no-diagnostics 26 import B; foo()27auto foo() { 28 return bar<int>(); 29 } 30