1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // <iosfwd>
10 
11 #include <iosfwd>
12 #include <cwchar>  // for mbstate_t
13 
14 #include "test_macros.h"
15 
test()16 template <class Ptr> void test()
17 {
18     Ptr p = 0;
19     ((void)p); // Prevent unused warning
20 }
21 
main(int,char **)22 int main(int, char**)
23 {
24     test<std::char_traits<char>*          >();
25     test<std::char_traits<wchar_t>*       >();
26     test<std::char_traits<unsigned short>*>();
27 
28     test<std::basic_ios<char>*          >();
29     test<std::basic_ios<wchar_t>*       >();
30     test<std::basic_ios<unsigned short>*>();
31 
32     test<std::basic_streambuf<char>*          >();
33     test<std::basic_streambuf<wchar_t>*       >();
34     test<std::basic_streambuf<unsigned short>*>();
35 
36     test<std::basic_istream<char>*          >();
37     test<std::basic_istream<wchar_t>*       >();
38     test<std::basic_istream<unsigned short>*>();
39 
40     test<std::basic_ostream<char>*          >();
41     test<std::basic_ostream<wchar_t>*       >();
42     test<std::basic_ostream<unsigned short>*>();
43 
44     test<std::basic_iostream<char>*          >();
45     test<std::basic_iostream<wchar_t>*       >();
46     test<std::basic_iostream<unsigned short>*>();
47 
48     test<std::basic_stringbuf<char>*          >();
49     test<std::basic_stringbuf<wchar_t>*       >();
50     test<std::basic_stringbuf<unsigned short>*>();
51 
52     test<std::basic_istringstream<char>*          >();
53     test<std::basic_istringstream<wchar_t>*       >();
54     test<std::basic_istringstream<unsigned short>*>();
55 
56     test<std::basic_ostringstream<char>*          >();
57     test<std::basic_ostringstream<wchar_t>*       >();
58     test<std::basic_ostringstream<unsigned short>*>();
59 
60     test<std::basic_stringstream<char>*          >();
61     test<std::basic_stringstream<wchar_t>*       >();
62     test<std::basic_stringstream<unsigned short>*>();
63 
64     test<std::basic_filebuf<char>*          >();
65     test<std::basic_filebuf<wchar_t>*       >();
66     test<std::basic_filebuf<unsigned short>*>();
67 
68     test<std::basic_ifstream<char>*          >();
69     test<std::basic_ifstream<wchar_t>*       >();
70     test<std::basic_ifstream<unsigned short>*>();
71 
72     test<std::basic_ofstream<char>*          >();
73     test<std::basic_ofstream<wchar_t>*       >();
74     test<std::basic_ofstream<unsigned short>*>();
75 
76     test<std::basic_fstream<char>*          >();
77     test<std::basic_fstream<wchar_t>*       >();
78     test<std::basic_fstream<unsigned short>*>();
79 
80     test<std::istreambuf_iterator<char>*          >();
81     test<std::istreambuf_iterator<wchar_t>*       >();
82     test<std::istreambuf_iterator<unsigned short>*>();
83 
84     test<std::ostreambuf_iterator<char>*          >();
85     test<std::ostreambuf_iterator<wchar_t>*       >();
86     test<std::ostreambuf_iterator<unsigned short>*>();
87 
88     test<std::ios* >();
89     test<std::wios*>();
90 
91     test<std::streambuf*>();
92     test<std::istream*  >();
93     test<std::ostream*  >();
94     test<std::iostream* >();
95 
96     test<std::stringbuf*    >();
97     test<std::istringstream*>();
98     test<std::ostringstream*>();
99     test<std::stringstream* >();
100 
101     test<std::filebuf* >();
102     test<std::ifstream*>();
103     test<std::ofstream*>();
104     test<std::fstream* >();
105 
106     test<std::wstreambuf*>();
107     test<std::wistream*  >();
108     test<std::wostream*  >();
109     test<std::wiostream* >();
110 
111     test<std::wstringbuf*    >();
112     test<std::wistringstream*>();
113     test<std::wostringstream*>();
114     test<std::wstringstream* >();
115 
116     test<std::wfilebuf* >();
117     test<std::wifstream*>();
118     test<std::wofstream*>();
119     test<std::wfstream* >();
120 
121     test<std::fpos<std::mbstate_t>*>();
122     test<std::streampos*           >();
123     test<std::wstreampos*          >();
124 
125   return 0;
126 }
127