| OLD | NEW |
| 1 // -*- C++ -*- | 1 // -*- C++ -*- |
| 2 //===--------------------------- iosfwd -----------------------------------===// | 2 //===--------------------------- iosfwd -----------------------------------===// |
| 3 // | 3 // |
| 4 // The LLVM Compiler Infrastructure | 4 // The LLVM Compiler Infrastructure |
| 5 // | 5 // |
| 6 // This file is dual licensed under the MIT and the University of Illinois Open | 6 // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 // Source Licenses. See LICENSE.TXT for details. | 7 // Source Licenses. See LICENSE.TXT for details. |
| 8 // | 8 // |
| 9 //===----------------------------------------------------------------------===// | 9 //===----------------------------------------------------------------------===// |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #pragma GCC system_header | 93 #pragma GCC system_header |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 _LIBCPP_BEGIN_NAMESPACE_STD | 96 _LIBCPP_BEGIN_NAMESPACE_STD |
| 97 | 97 |
| 98 class _LIBCPP_TYPE_VIS ios_base; | 98 class _LIBCPP_TYPE_VIS ios_base; |
| 99 | 99 |
| 100 template<class _CharT> struct _LIBCPP_TYPE_VIS_ONLY char_traits; | 100 template<class _CharT> struct _LIBCPP_TYPE_VIS_ONLY char_traits; |
| 101 template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY allocator; | 101 template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY allocator; |
| 102 | 102 |
| 103 // TODO: forward_list |
| 104 enum class allocation_group |
| 105 { |
| 106 allocator, |
| 107 deque, |
| 108 list, |
| 109 map, |
| 110 multimap, |
| 111 multiset, |
| 112 set, |
| 113 shared_ptr, |
| 114 string, |
| 115 unordered_map, |
| 116 unordered_multimap, |
| 117 unordered_multiset, |
| 118 unordered_set, |
| 119 vector, |
| 120 vector_bool, |
| 121 |
| 122 group_count, |
| 123 invalid_group = group_count |
| 124 }; |
| 125 constexpr size_t allocation_group_count = static_cast<size_t>(allocation_group::
group_count); |
| 126 |
| 127 const char* get_allocation_group_name(allocation_group group); |
| 128 |
| 129 template <class T, allocation_group Group, class Payload = T> |
| 130 class _LIBCPP_TYPE_VIS_ONLY counting_allocator; |
| 131 |
| 103 template <class _CharT, class _Traits = char_traits<_CharT> > | 132 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 104 class _LIBCPP_TYPE_VIS_ONLY basic_ios; | 133 class _LIBCPP_TYPE_VIS_ONLY basic_ios; |
| 105 | 134 |
| 106 template <class _CharT, class _Traits = char_traits<_CharT> > | 135 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 107 class _LIBCPP_TYPE_VIS_ONLY basic_streambuf; | 136 class _LIBCPP_TYPE_VIS_ONLY basic_streambuf; |
| 108 template <class _CharT, class _Traits = char_traits<_CharT> > | 137 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 109 class _LIBCPP_TYPE_VIS_ONLY basic_istream; | 138 class _LIBCPP_TYPE_VIS_ONLY basic_istream; |
| 110 template <class _CharT, class _Traits = char_traits<_CharT> > | 139 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 111 class _LIBCPP_TYPE_VIS_ONLY basic_ostream; | 140 class _LIBCPP_TYPE_VIS_ONLY basic_ostream; |
| 112 template <class _CharT, class _Traits = char_traits<_CharT> > | 141 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 113 class _LIBCPP_TYPE_VIS_ONLY basic_iostream; | 142 class _LIBCPP_TYPE_VIS_ONLY basic_iostream; |
| 114 | 143 |
| 115 template <class _CharT, class _Traits = char_traits<_CharT>, | 144 template <class _CharT, class _Traits = char_traits<_CharT>, |
| 116 class _Allocator = allocator<_CharT> > | 145 class _Allocator = counting_allocator<_CharT, allocation_group::string
> > |
| 117 class _LIBCPP_TYPE_VIS_ONLY basic_stringbuf; | 146 class _LIBCPP_TYPE_VIS_ONLY basic_stringbuf; |
| 118 template <class _CharT, class _Traits = char_traits<_CharT>, | 147 template <class _CharT, class _Traits = char_traits<_CharT>, |
| 119 class _Allocator = allocator<_CharT> > | 148 class _Allocator = counting_allocator<_CharT, allocation_group::string
> > |
| 120 class _LIBCPP_TYPE_VIS_ONLY basic_istringstream; | 149 class _LIBCPP_TYPE_VIS_ONLY basic_istringstream; |
| 121 template <class _CharT, class _Traits = char_traits<_CharT>, | 150 template <class _CharT, class _Traits = char_traits<_CharT>, |
| 122 class _Allocator = allocator<_CharT> > | 151 class _Allocator = counting_allocator<_CharT, allocation_group::string
> > |
| 123 class _LIBCPP_TYPE_VIS_ONLY basic_ostringstream; | 152 class _LIBCPP_TYPE_VIS_ONLY basic_ostringstream; |
| 124 template <class _CharT, class _Traits = char_traits<_CharT>, | 153 template <class _CharT, class _Traits = char_traits<_CharT>, |
| 125 class _Allocator = allocator<_CharT> > | 154 class _Allocator = counting_allocator<_CharT, allocation_group::string
> > |
| 126 class _LIBCPP_TYPE_VIS_ONLY basic_stringstream; | 155 class _LIBCPP_TYPE_VIS_ONLY basic_stringstream; |
| 127 | 156 |
| 128 template <class _CharT, class _Traits = char_traits<_CharT> > | 157 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 129 class _LIBCPP_TYPE_VIS_ONLY basic_filebuf; | 158 class _LIBCPP_TYPE_VIS_ONLY basic_filebuf; |
| 130 template <class _CharT, class _Traits = char_traits<_CharT> > | 159 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 131 class _LIBCPP_TYPE_VIS_ONLY basic_ifstream; | 160 class _LIBCPP_TYPE_VIS_ONLY basic_ifstream; |
| 132 template <class _CharT, class _Traits = char_traits<_CharT> > | 161 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 133 class _LIBCPP_TYPE_VIS_ONLY basic_ofstream; | 162 class _LIBCPP_TYPE_VIS_ONLY basic_ofstream; |
| 134 template <class _CharT, class _Traits = char_traits<_CharT> > | 163 template <class _CharT, class _Traits = char_traits<_CharT> > |
| 135 class _LIBCPP_TYPE_VIS_ONLY basic_fstream; | 164 class _LIBCPP_TYPE_VIS_ONLY basic_fstream; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 211 |
| 183 #if defined(_NEWLIB_VERSION) | 212 #if defined(_NEWLIB_VERSION) |
| 184 // On newlib, off_t is 'long int' | 213 // On newlib, off_t is 'long int' |
| 185 typedef long int streamoff; // for char_traits in <string> | 214 typedef long int streamoff; // for char_traits in <string> |
| 186 #else | 215 #else |
| 187 typedef long long streamoff; // for char_traits in <string> | 216 typedef long long streamoff; // for char_traits in <string> |
| 188 #endif | 217 #endif |
| 189 | 218 |
| 190 template <class _CharT, // for <stdexcept> | 219 template <class _CharT, // for <stdexcept> |
| 191 class _Traits = char_traits<_CharT>, | 220 class _Traits = char_traits<_CharT>, |
| 192 class _Allocator = allocator<_CharT> > | 221 class _Allocator = counting_allocator<_CharT, allocation_group::string
> > |
| 193 class _LIBCPP_TYPE_VIS_ONLY basic_string; | 222 class _LIBCPP_TYPE_VIS_ONLY basic_string; |
| 194 typedef basic_string<char, char_traits<char>, allocator<char> > string; | 223 typedef basic_string<char, char_traits<char>, counting_allocator<char, allocatio
n_group::string> > string; |
| 195 typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring
; | 224 typedef basic_string<wchar_t, char_traits<wchar_t>, counting_allocator<wchar_t,
allocation_group::string> > wstring; |
| 196 | 225 |
| 197 _LIBCPP_END_NAMESPACE_STD | 226 _LIBCPP_END_NAMESPACE_STD |
| 198 | 227 |
| 199 #endif // _LIBCPP_IOSFWD | 228 #endif // _LIBCPP_IOSFWD |
| OLD | NEW |