Skip to content

Commit 5d6a1f2

Browse files
misccoAdamBuciorCharlie BartoMattStephansonStephanTLavavej
authored
Implement P0448R4 spanstream (#2029)
Co-authored-by: Adam Bucior <[email protected]> Co-authored-by: Charlie Barto <[email protected]> Co-authored-by: Matt Stephanson <[email protected]> Co-authored-by: Stephan T. Lavavej <[email protected]>
1 parent d5feb03 commit 5d6a1f2

File tree

16 files changed

+1640
-0
lines changed

16 files changed

+1640
-0
lines changed

stl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ set(HEADERS
182182
${CMAKE_CURRENT_LIST_DIR}/inc/shared_mutex
183183
${CMAKE_CURRENT_LIST_DIR}/inc/source_location
184184
${CMAKE_CURRENT_LIST_DIR}/inc/span
185+
${CMAKE_CURRENT_LIST_DIR}/inc/spanstream
185186
${CMAKE_CURRENT_LIST_DIR}/inc/sstream
186187
${CMAKE_CURRENT_LIST_DIR}/inc/stack
187188
${CMAKE_CURRENT_LIST_DIR}/inc/stdatomic.h

stl/inc/__msvc_all_public_headers.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
#include <scoped_allocator>
116116
#include <set>
117117
#include <span>
118+
#include <spanstream>
118119
#include <sstream>
119120
#include <stack>
120121
#include <stdexcept>

stl/inc/header-units.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"shared_mutex",
9393
"source_location",
9494
"span",
95+
"spanstream",
9596
"sstream",
9697
"stack",
9798
"stdatomic.h",

stl/inc/iosfwd

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,16 @@ template <class _Elem, class _Traits = char_traits<_Elem>, class _Alloc = alloca
189189
class basic_ostringstream;
190190
template <class _Elem, class _Traits = char_traits<_Elem>, class _Alloc = allocator<_Elem>>
191191
class basic_stringstream;
192+
#if _HAS_CXX23
193+
template <class _Elem, class _Traits = char_traits<_Elem>>
194+
class basic_spanbuf;
195+
template <class _Elem, class _Traits = char_traits<_Elem>>
196+
class basic_ispanstream;
197+
template <class _Elem, class _Traits = char_traits<_Elem>>
198+
class basic_ospanstream;
199+
template <class _Elem, class _Traits = char_traits<_Elem>>
200+
class basic_spanstream;
201+
#endif // _HAS_CXX23
192202
template <class _Elem, class _Traits = char_traits<_Elem>>
193203
class basic_filebuf;
194204
template <class _Elem, class _Traits = char_traits<_Elem>>
@@ -232,6 +242,12 @@ using fstream = basic_fstream<char, char_traits<char>>;
232242
using syncbuf = basic_syncbuf<char>;
233243
using osyncstream = basic_osyncstream<char>;
234244
#endif // _HAS_CXX20
245+
#if _HAS_CXX23
246+
using spanbuf = basic_spanbuf<char>;
247+
using ispanstream = basic_ispanstream<char>;
248+
using ospanstream = basic_ospanstream<char>;
249+
using spanstream = basic_spanstream<char>;
250+
#endif // _HAS_CXX23
235251

236252
using wios = basic_ios<wchar_t, char_traits<wchar_t>>;
237253
using wstreambuf = basic_streambuf<wchar_t, char_traits<wchar_t>>;
@@ -250,6 +266,12 @@ using wfstream = basic_fstream<wchar_t, char_traits<wchar_t>>;
250266
using wsyncbuf = basic_syncbuf<wchar_t>;
251267
using wosyncstream = basic_osyncstream<wchar_t>;
252268
#endif // _HAS_CXX20
269+
#if _HAS_CXX23
270+
using wspanbuf = basic_spanbuf<wchar_t>;
271+
using wispanstream = basic_ispanstream<wchar_t>;
272+
using wospanstream = basic_ospanstream<wchar_t>;
273+
using wspanstream = basic_spanstream<wchar_t>;
274+
#endif // _HAS_CXX23
253275

254276
#if defined(_CRTBLD)
255277
using ushistream = basic_istream<unsigned short, char_traits<unsigned short>>;

0 commit comments

Comments
 (0)