1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 #include "test_macros.h"
15 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
19 template <class Ptr
> void test()
22 ((void)p
); // Prevent unused warning
27 test
<std::char_traits
<char>* >();
28 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
29 test
<std::char_traits
<wchar_t>* >();
32 test
<std::basic_ios
<char>* >();
33 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
34 test
<std::basic_ios
<wchar_t>* >();
36 test
<std::basic_ios
<unsigned short>*>();
38 test
<std::basic_streambuf
<char>* >();
39 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
40 test
<std::basic_streambuf
<wchar_t>* >();
42 test
<std::basic_streambuf
<unsigned short>*>();
44 test
<std::basic_istream
<char>* >();
45 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
46 test
<std::basic_istream
<wchar_t>* >();
48 test
<std::basic_istream
<unsigned short>*>();
50 test
<std::basic_ostream
<char>* >();
51 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
52 test
<std::basic_ostream
<wchar_t>* >();
54 test
<std::basic_ostream
<unsigned short>*>();
56 test
<std::basic_iostream
<char>* >();
57 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
58 test
<std::basic_iostream
<wchar_t>* >();
60 test
<std::basic_iostream
<unsigned short>*>();
62 test
<std::basic_stringbuf
<char>* >();
63 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
64 test
<std::basic_stringbuf
<wchar_t>* >();
66 test
<std::basic_stringbuf
<unsigned short>*>();
68 test
<std::basic_istringstream
<char>* >();
69 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
70 test
<std::basic_istringstream
<wchar_t>* >();
72 test
<std::basic_istringstream
<unsigned short>*>();
74 test
<std::basic_ostringstream
<char>* >();
75 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
76 test
<std::basic_ostringstream
<wchar_t>* >();
78 test
<std::basic_ostringstream
<unsigned short>*>();
80 test
<std::basic_stringstream
<char>* >();
81 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
82 test
<std::basic_stringstream
<wchar_t>* >();
84 test
<std::basic_stringstream
<unsigned short>*>();
86 test
<std::basic_filebuf
<char>* >();
87 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
88 test
<std::basic_filebuf
<wchar_t>* >();
90 test
<std::basic_filebuf
<unsigned short>*>();
92 test
<std::basic_ifstream
<char>* >();
93 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
94 test
<std::basic_ifstream
<wchar_t>* >();
96 test
<std::basic_ifstream
<unsigned short>*>();
98 test
<std::basic_ofstream
<char>* >();
99 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
100 test
<std::basic_ofstream
<wchar_t>* >();
102 test
<std::basic_ofstream
<unsigned short>*>();
104 test
<std::basic_fstream
<char>* >();
105 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
106 test
<std::basic_fstream
<wchar_t>* >();
108 test
<std::basic_fstream
<unsigned short>*>();
110 test
<std::istreambuf_iterator
<char>* >();
111 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
112 test
<std::istreambuf_iterator
<wchar_t>* >();
114 test
<std::istreambuf_iterator
<unsigned short>*>();
116 test
<std::ostreambuf_iterator
<char>* >();
117 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
118 test
<std::ostreambuf_iterator
<wchar_t>* >();
120 test
<std::ostreambuf_iterator
<unsigned short>*>();
123 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
127 test
<std::streambuf
*>();
128 test
<std::istream
* >();
129 test
<std::ostream
* >();
130 test
<std::iostream
* >();
132 test
<std::stringbuf
* >();
133 test
<std::istringstream
*>();
134 test
<std::ostringstream
*>();
135 test
<std::stringstream
* >();
137 test
<std::filebuf
* >();
138 test
<std::ifstream
*>();
139 test
<std::ofstream
*>();
140 test
<std::fstream
* >();
142 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
143 test
<std::wstreambuf
*>();
144 test
<std::wistream
* >();
145 test
<std::wostream
* >();
146 test
<std::wiostream
* >();
148 test
<std::wstringbuf
* >();
149 test
<std::wistringstream
*>();
150 test
<std::wostringstream
*>();
151 test
<std::wstringstream
* >();
153 test
<std::wfilebuf
* >();
154 test
<std::wifstream
*>();
155 test
<std::wofstream
*>();
156 test
<std::wfstream
* >();
159 test
<std::fpos
<std::mbstate_t>*>();
160 test
<std::streampos
* >();
161 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
162 test
<std::wstreampos
* >();