source: mainline/uspace/lib/cpp/include/impl/iosfwd.hpp@ 68cfab1

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 68cfab1 was 5209fd7, checked in by Dzejrou <dzejrou@…>, 7 years ago

cpp: added missing include guards

  • Property mode set to 100644
File size: 4.9 KB
Line 
1/*
2 * Copyright (c) 2017 Jaroslav Jindrak
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef LIBCPP_IOSFWD
30#define LIBCPP_IOSFWD
31
32namespace std
33{
34 /**
35 * 27.3, forward declarations:
36 */
37
38 template<class Char>
39 class char_traits;
40
41 template<>
42 class char_traits<char>;
43
44 template<>
45 class char_traits<char16_t>;
46
47 template<>
48 class char_traits<char32_t>;
49
50 template<>
51 class char_traits<wchar_t>;
52
53
54
55 template<class T>
56 class allocator;
57
58
59
60 template<class Char, class Traits = char_traits<Char>>
61 class basic_ios;
62
63 template<class Char, class Traits = char_traits<Char>>
64 class basic_streambuf;
65
66 template<class Char, class Traits = char_traits<Char>>
67 class basic_istream;
68
69 template<class Char, class Traits = char_traits<Char>>
70 class basic_ostream;
71
72 template<class Char, class Traits = char_traits<Char>>
73 class basic_iostream;
74
75
76
77 template<class Char, class Traits = char_traits<Char>,
78 class Allocator = allocator<Char>>
79 class basic_stringbuf;
80
81 template<class Char, class Traits = char_traits<Char>,
82 class Allocator = allocator<Char>>
83 class basic_istringstream;
84
85 template<class Char, class Traits = char_traits<Char>,
86 class Allocator = allocator<Char>>
87 class basic_ostringstream;
88
89 template<class Char, class Traits = char_traits<Char>,
90 class Allocator = allocator<Char>>
91 class basic_stringstream;
92
93
94
95 template<class Char, class Traits = char_traits<Char>>
96 class basic_filebuf;
97
98 template<class Char, class Traits = char_traits<Char>>
99 class basic_ifstream;
100
101 template<class Char, class Traits = char_traits<Char>>
102 class basic_ofstream;
103
104 template<class Char, class Traits = char_traits<Char>>
105 class basic_fstream;
106
107
108
109 template<class Char, class Traits = char_traits<Char>>
110 class istreambuf_iterator;
111
112 template<class Char, class Traits = char_traits<Char>>
113 class ostreambuf_iterator;
114
115 using ios = basic_ios<char>;
116 using wios = basic_ios<wchar_t>;
117
118 using streambuf = basic_streambuf<char>;
119 using istream = basic_istream<char>;
120 using ostream = basic_ostream<char>;
121 using iostream = basic_iostream<char>;
122
123 using stringbuf = basic_stringbuf<char>;
124 using istringstream = basic_istringstream<char>;
125 using ostringstream = basic_ostringstream<char>;
126 using stringstream = basic_stringstream<char>;
127
128 using filebuf = basic_filebuf<char>;
129 using ifstream = basic_ifstream<char>;
130 using ofstream = basic_ofstream<char>;
131 using fstream = basic_fstream<char>;
132
133 using wstreambuf = basic_streambuf<wchar_t>;
134 using wistream = basic_istream<wchar_t>;
135 using wostream = basic_ostream<wchar_t>;
136 using wiostream = basic_iostream<wchar_t>;
137
138 using wstringbuf = basic_stringbuf<wchar_t>;
139 using wistringstream = basic_istringstream<wchar_t>;
140 using wostringstream = basic_ostringstream<wchar_t>;
141 using wstringstream = basic_stringstream<wchar_t>;
142
143 using wfilebuf = basic_filebuf<wchar_t>;
144 using wifstream = basic_ifstream<wchar_t>;
145 using wofstream = basic_ofstream<wchar_t>;
146 using wfstream = basic_fstream<wchar_t>;
147
148 template<class State>
149 class fpos;
150
151 // TODO: standard p. 1012, this is circular, it offers fix
152 /* using streampos = fpos<char_traits<char>::state_type>; */
153 /* using wstreampos = fpos<char_traits<wchar_t>::state_type>; */
154 // Temporary workaround.
155 using streampos = unsigned long long;
156 using wstreampos = unsigned long long;
157 // TODO: This should be in ios and not here?
158 using streamoff = long long;
159}
160
161#endif
Note: See TracBrowser for help on using the repository browser.