2 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 %t/A-B.cppm -I%t -emit-module-interface -o %t/A-B.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/A-C.cppm -I%t -emit-module-interface -o %t/A-C.pcm
7 // RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -fprebuilt-module-path=%t -o %t/A.pcm
8 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only
11 template <typename U, typename T>
20 template <class _Key, class _Tp,
21 class _Alloc = allocator<pair<const _Key, _Tp> > >
28 template<bool, class = void> struct my_enable_if {};
29 template<class T> struct my_enable_if<true, T> { using type = T; };
30 template<bool B, class T = void> using my_enable_if_t = typename my_enable_if<B, T>::type;
32 template<class _InputIterator,
33 class _Allocator = allocator<my_traits<_InputIterator>>,
34 class = my_enable_if_t<_InputIterator::value>>
35 unordered_map(_InputIterator, _InputIterator, _Allocator = _Allocator())
36 -> unordered_map<my_traits<_InputIterator>, my_traits<_InputIterator>, _Allocator>;
38 template <class _CharT,
39 class _Traits = my_traits<_CharT>,
40 class _Allocator = allocator<_CharT> >
42 typedef basic_string<char, my_traits<char>, allocator<char> > string;
44 template<class _CharT, class _Traits, class _Allocator>
50 template<class _InputIterator, class = my_enable_if_t<_InputIterator::value> >
51 basic_string(_InputIterator __first, _InputIterator __last, const _Allocator& __a);
53 void resize(unsigned __n, _CharT __c);
56 extern template void basic_string<char>::resize(unsigned, char);
62 export using ::string;
77 ::unordered_map<int, int> mime_map; // expected-error {{missing '#include'; 'unordered_map' must be declared before it is used}}
78 // expected-note@* {{declaration here is not visible}}