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
10 // Test again with reduced BMI.
12 // RUN: %clang_cc1 -std=c++20 %t/A-B.cppm -I%t -emit-reduced-module-interface -o %t/A-B.pcm
13 // RUN: %clang_cc1 -std=c++20 %t/A-C.cppm -I%t -emit-reduced-module-interface -o %t/A-C.pcm
14 // RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -fprebuilt-module-path=%t -o %t/A.pcm
15 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only
19 template <typename U, typename T>
28 template <class _Key, class _Tp,
29 class _Alloc = allocator<pair<const _Key, _Tp> > >
36 template<bool, class = void> struct my_enable_if {};
37 template<class T> struct my_enable_if<true, T> { using type = T; };
38 template<bool B, class T = void> using my_enable_if_t = typename my_enable_if<B, T>::type;
40 template<class _InputIterator,
41 class _Allocator = allocator<my_traits<_InputIterator>>,
42 class = my_enable_if_t<_InputIterator::value>>
43 unordered_map(_InputIterator, _InputIterator, _Allocator = _Allocator())
44 -> unordered_map<my_traits<_InputIterator>, my_traits<_InputIterator>, _Allocator>;
46 template <class _CharT,
47 class _Traits = my_traits<_CharT>,
48 class _Allocator = allocator<_CharT> >
50 typedef basic_string<char, my_traits<char>, allocator<char> > string;
52 template<class _CharT, class _Traits, class _Allocator>
58 template<class _InputIterator, class = my_enable_if_t<_InputIterator::value> >
59 basic_string(_InputIterator __first, _InputIterator __last, const _Allocator& __a);
61 void resize(unsigned __n, _CharT __c);
64 extern template void basic_string<char>::resize(unsigned, char);
70 export using ::string;
85 ::unordered_map<int, int> mime_map; // expected-error {{missing '#include'; 'unordered_map' must be declared before it is used}}
86 // expected-note@* {{declaration here is not visible}}