xref: /minix3/external/bsd/libc++/dist/libcxx/test/input.output/iostream.forward/iosfwd.pass.cpp (revision 4684ddb6aab0b36791c8099bc705d6140b3d05d0)
1*4684ddb6SLionel Sambuc //===----------------------------------------------------------------------===//
2*4684ddb6SLionel Sambuc //
3*4684ddb6SLionel Sambuc //                     The LLVM Compiler Infrastructure
4*4684ddb6SLionel Sambuc //
5*4684ddb6SLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open
6*4684ddb6SLionel Sambuc // Source Licenses. See LICENSE.TXT for details.
7*4684ddb6SLionel Sambuc //
8*4684ddb6SLionel Sambuc //===----------------------------------------------------------------------===//
9*4684ddb6SLionel Sambuc 
10*4684ddb6SLionel Sambuc // <iosfwd>
11*4684ddb6SLionel Sambuc 
12*4684ddb6SLionel Sambuc #include <iosfwd>
13*4684ddb6SLionel Sambuc #include <cwchar>  // for mbstate_t
14*4684ddb6SLionel Sambuc 
main()15*4684ddb6SLionel Sambuc int main()
16*4684ddb6SLionel Sambuc {
17*4684ddb6SLionel Sambuc     {
18*4684ddb6SLionel Sambuc     std::char_traits<char>*               t1 = 0;
19*4684ddb6SLionel Sambuc     std::char_traits<wchar_t>*            t2 = 0;
20*4684ddb6SLionel Sambuc     std::char_traits<unsigned short>*     t3 = 0;
21*4684ddb6SLionel Sambuc     }
22*4684ddb6SLionel Sambuc     {
23*4684ddb6SLionel Sambuc     std::basic_ios<char>*                 t1 = 0;
24*4684ddb6SLionel Sambuc     std::basic_ios<wchar_t>*              t2 = 0;
25*4684ddb6SLionel Sambuc     std::basic_ios<unsigned short>*       t3 = 0;
26*4684ddb6SLionel Sambuc     }
27*4684ddb6SLionel Sambuc     {
28*4684ddb6SLionel Sambuc     std::basic_streambuf<char>*           t1 = 0;
29*4684ddb6SLionel Sambuc     std::basic_streambuf<wchar_t>*        t2 = 0;
30*4684ddb6SLionel Sambuc     std::basic_streambuf<unsigned short>* t3 = 0;
31*4684ddb6SLionel Sambuc     }
32*4684ddb6SLionel Sambuc     {
33*4684ddb6SLionel Sambuc     std::basic_istream<char>*             t1 = 0;
34*4684ddb6SLionel Sambuc     std::basic_istream<wchar_t>*          t2 = 0;
35*4684ddb6SLionel Sambuc     std::basic_istream<unsigned short>*   t3 = 0;
36*4684ddb6SLionel Sambuc     }
37*4684ddb6SLionel Sambuc     {
38*4684ddb6SLionel Sambuc     std::basic_ostream<char>*             t1 = 0;
39*4684ddb6SLionel Sambuc     std::basic_ostream<wchar_t>*          t2 = 0;
40*4684ddb6SLionel Sambuc     std::basic_ostream<unsigned short>*   t3 = 0;
41*4684ddb6SLionel Sambuc     }
42*4684ddb6SLionel Sambuc     {
43*4684ddb6SLionel Sambuc     std::basic_iostream<char>*             t1 = 0;
44*4684ddb6SLionel Sambuc     std::basic_iostream<wchar_t>*          t2 = 0;
45*4684ddb6SLionel Sambuc     std::basic_iostream<unsigned short>*   t3 = 0;
46*4684ddb6SLionel Sambuc     }
47*4684ddb6SLionel Sambuc     {
48*4684ddb6SLionel Sambuc     std::basic_stringbuf<char>*             t1 = 0;
49*4684ddb6SLionel Sambuc     std::basic_stringbuf<wchar_t>*          t2 = 0;
50*4684ddb6SLionel Sambuc     std::basic_stringbuf<unsigned short>*   t3 = 0;
51*4684ddb6SLionel Sambuc     }
52*4684ddb6SLionel Sambuc     {
53*4684ddb6SLionel Sambuc     std::basic_istringstream<char>*             t1 = 0;
54*4684ddb6SLionel Sambuc     std::basic_istringstream<wchar_t>*          t2 = 0;
55*4684ddb6SLionel Sambuc     std::basic_istringstream<unsigned short>*   t3 = 0;
56*4684ddb6SLionel Sambuc     }
57*4684ddb6SLionel Sambuc     {
58*4684ddb6SLionel Sambuc     std::basic_ostringstream<char>*             t1 = 0;
59*4684ddb6SLionel Sambuc     std::basic_ostringstream<wchar_t>*          t2 = 0;
60*4684ddb6SLionel Sambuc     std::basic_ostringstream<unsigned short>*   t3 = 0;
61*4684ddb6SLionel Sambuc     }
62*4684ddb6SLionel Sambuc     {
63*4684ddb6SLionel Sambuc     std::basic_stringstream<char>*             t1 = 0;
64*4684ddb6SLionel Sambuc     std::basic_stringstream<wchar_t>*          t2 = 0;
65*4684ddb6SLionel Sambuc     std::basic_stringstream<unsigned short>*   t3 = 0;
66*4684ddb6SLionel Sambuc     }
67*4684ddb6SLionel Sambuc     {
68*4684ddb6SLionel Sambuc     std::basic_filebuf<char>*             t1 = 0;
69*4684ddb6SLionel Sambuc     std::basic_filebuf<wchar_t>*          t2 = 0;
70*4684ddb6SLionel Sambuc     std::basic_filebuf<unsigned short>*   t3 = 0;
71*4684ddb6SLionel Sambuc     }
72*4684ddb6SLionel Sambuc     {
73*4684ddb6SLionel Sambuc     std::basic_ifstream<char>*             t1 = 0;
74*4684ddb6SLionel Sambuc     std::basic_ifstream<wchar_t>*          t2 = 0;
75*4684ddb6SLionel Sambuc     std::basic_ifstream<unsigned short>*   t3 = 0;
76*4684ddb6SLionel Sambuc     }
77*4684ddb6SLionel Sambuc     {
78*4684ddb6SLionel Sambuc     std::basic_ofstream<char>*             t1 = 0;
79*4684ddb6SLionel Sambuc     std::basic_ofstream<wchar_t>*          t2 = 0;
80*4684ddb6SLionel Sambuc     std::basic_ofstream<unsigned short>*   t3 = 0;
81*4684ddb6SLionel Sambuc     }
82*4684ddb6SLionel Sambuc     {
83*4684ddb6SLionel Sambuc     std::basic_fstream<char>*             t1 = 0;
84*4684ddb6SLionel Sambuc     std::basic_fstream<wchar_t>*          t2 = 0;
85*4684ddb6SLionel Sambuc     std::basic_fstream<unsigned short>*   t3 = 0;
86*4684ddb6SLionel Sambuc     }
87*4684ddb6SLionel Sambuc     {
88*4684ddb6SLionel Sambuc     std::istreambuf_iterator<char>*             t1 = 0;
89*4684ddb6SLionel Sambuc     std::istreambuf_iterator<wchar_t>*          t2 = 0;
90*4684ddb6SLionel Sambuc     std::istreambuf_iterator<unsigned short>*   t3 = 0;
91*4684ddb6SLionel Sambuc     }
92*4684ddb6SLionel Sambuc     {
93*4684ddb6SLionel Sambuc     std::ostreambuf_iterator<char>*             t1 = 0;
94*4684ddb6SLionel Sambuc     std::ostreambuf_iterator<wchar_t>*          t2 = 0;
95*4684ddb6SLionel Sambuc     std::ostreambuf_iterator<unsigned short>*   t3 = 0;
96*4684ddb6SLionel Sambuc     }
97*4684ddb6SLionel Sambuc     {
98*4684ddb6SLionel Sambuc     std::ios*           t1 = 0;
99*4684ddb6SLionel Sambuc     std::wios*          t2 = 0;
100*4684ddb6SLionel Sambuc     }
101*4684ddb6SLionel Sambuc     {
102*4684ddb6SLionel Sambuc     std::streambuf*        t1 = 0;
103*4684ddb6SLionel Sambuc     std::istream*          t2 = 0;
104*4684ddb6SLionel Sambuc     std::ostream*          t3 = 0;
105*4684ddb6SLionel Sambuc     std::iostream*         t4 = 0;
106*4684ddb6SLionel Sambuc     }
107*4684ddb6SLionel Sambuc     {
108*4684ddb6SLionel Sambuc     std::stringbuf*            t1 = 0;
109*4684ddb6SLionel Sambuc     std::istringstream*        t2 = 0;
110*4684ddb6SLionel Sambuc     std::ostringstream*        t3 = 0;
111*4684ddb6SLionel Sambuc     std::stringstream*         t4 = 0;
112*4684ddb6SLionel Sambuc     }
113*4684ddb6SLionel Sambuc     {
114*4684ddb6SLionel Sambuc     std::filebuf*         t1 = 0;
115*4684ddb6SLionel Sambuc     std::ifstream*        t2 = 0;
116*4684ddb6SLionel Sambuc     std::ofstream*        t3 = 0;
117*4684ddb6SLionel Sambuc     std::fstream*         t4 = 0;
118*4684ddb6SLionel Sambuc     }
119*4684ddb6SLionel Sambuc     {
120*4684ddb6SLionel Sambuc     std::wstreambuf*        t1 = 0;
121*4684ddb6SLionel Sambuc     std::wistream*          t2 = 0;
122*4684ddb6SLionel Sambuc     std::wostream*          t3 = 0;
123*4684ddb6SLionel Sambuc     std::wiostream*         t4 = 0;
124*4684ddb6SLionel Sambuc     }
125*4684ddb6SLionel Sambuc     {
126*4684ddb6SLionel Sambuc     std::wstringbuf*            t1 = 0;
127*4684ddb6SLionel Sambuc     std::wistringstream*        t2 = 0;
128*4684ddb6SLionel Sambuc     std::wostringstream*        t3 = 0;
129*4684ddb6SLionel Sambuc     std::wstringstream*         t4 = 0;
130*4684ddb6SLionel Sambuc     }
131*4684ddb6SLionel Sambuc     {
132*4684ddb6SLionel Sambuc     std::wfilebuf*         t1 = 0;
133*4684ddb6SLionel Sambuc     std::wifstream*        t2 = 0;
134*4684ddb6SLionel Sambuc     std::wofstream*        t3 = 0;
135*4684ddb6SLionel Sambuc     std::wfstream*         t4 = 0;
136*4684ddb6SLionel Sambuc     }
137*4684ddb6SLionel Sambuc     {
138*4684ddb6SLionel Sambuc     std::fpos<std::mbstate_t>*   t1 = 0;
139*4684ddb6SLionel Sambuc     std::streampos*              t2 = 0;
140*4684ddb6SLionel Sambuc     std::wstreampos*             t3 = 0;
141*4684ddb6SLionel Sambuc     }
142*4684ddb6SLionel Sambuc }
143