Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement P0448R4 spanstream #2029

Merged
merged 35 commits into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e94ce25
Implement spanstream
miscco Jun 26, 2021
3d12c64
Move aliases into iosfwd
miscco Jun 30, 2021
e9dee40
Address review comments
miscco Jul 1, 2021
40edba9
Add iosfwd test in sync with C++23
miscco Jul 1, 2021
e59ac94
Address review comments
miscco Jul 1, 2021
95643a5
More review comments
miscco Jul 1, 2021
5b413fb
Merge branch 'main' into spanstream
miscco Jul 23, 2021
ff35037
Address review comments
miscco Jul 23, 2021
1537a09
Merge branch 'main' into spanstream
miscco Aug 4, 2021
ef50108
uNstreampos is defined in xstring
miscco Aug 4, 2021
822de91
Merge branch 'main' into spanstream
miscco Aug 6, 2021
3ed6a02
Address review comments
miscco Aug 6, 2021
c61afd8
Add tests for const buffer
miscco Aug 6, 2021
2587e4c
Merge branch 'main' into spanstream
StephanTLavavej Aug 24, 2021
b1650ea
Work around DevCom-1511903.
StephanTLavavej Aug 24, 2021
92ec9c3
Merge branch 'main' into spanstream
StephanTLavavej Aug 28, 2021
76c7c7b
Add comment about `_STD span`.
StephanTLavavej Aug 28, 2021
e7b10b2
Private typedefs.
StephanTLavavej Aug 28, 2021
d03004d
Call member swap().
StephanTLavavej Aug 28, 2021
8b309e3
Mark rdbuf() and span() as _NODISCARD.
StephanTLavavej Aug 28, 2021
d57fc0a
Always qualify _STD span.
StephanTLavavej Aug 28, 2021
d0ec9af
Assignment needs to `return *this;`.
StephanTLavavej Aug 28, 2021
a2a4923
Comment nitpick: "member functions".
StephanTLavavej Aug 28, 2021
3134d3f
Drop `this->` for `rdbuf()`.
StephanTLavavej Aug 28, 2021
862f03d
`basic_ospanstream` and `basic_spanstream` need to return `span<_Elem>`.
StephanTLavavej Aug 28, 2021
8cad51f
Include more headers in the test.
StephanTLavavej Aug 28, 2021
31bca31
Fix comment typo.
StephanTLavavej Aug 28, 2021
5257648
Avoid test_buf shadowing.
StephanTLavavej Aug 28, 2021
1b5d100
Rename basic_ospanstream to os.
StephanTLavavej Aug 28, 2021
5116294
`test_spanstream()` should use `basic_spanstream` named `s`.
StephanTLavavej Aug 28, 2021
205178e
Fix test: `basic_spanstream` can't be constructed from `span<const Ch…
StephanTLavavej Aug 28, 2021
d40f1ee
Comment: `_Baseoff` is always non-negative.
StephanTLavavej Aug 28, 2021
34e426c
Add test that the returned `span` is indeed mutable
miscco Aug 28, 2021
7130829
Delete the (unintentionally re-added) vcpkg submodule.
StephanTLavavej Aug 30, 2021
f57ff9f
Use variable templates in the test.
StephanTLavavej Sep 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/shared_mutex
${CMAKE_CURRENT_LIST_DIR}/inc/source_location
${CMAKE_CURRENT_LIST_DIR}/inc/span
${CMAKE_CURRENT_LIST_DIR}/inc/spanstream
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
${CMAKE_CURRENT_LIST_DIR}/inc/sstream
${CMAKE_CURRENT_LIST_DIR}/inc/stack
${CMAKE_CURRENT_LIST_DIR}/inc/stdexcept
Expand Down
1 change: 1 addition & 0 deletions stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
#include <scoped_allocator>
#include <set>
#include <span>
#include <spanstream>
#include <sstream>
#include <stack>
#include <stdexcept>
Expand Down
1 change: 1 addition & 0 deletions stl/inc/header-units.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"shared_mutex",
"source_location",
"span",
"spanstream",
"sstream",
"stack",
"stdexcept",
Expand Down
22 changes: 22 additions & 0 deletions stl/inc/iosfwd
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ template <class _Elem, class _Traits = char_traits<_Elem>, class _Alloc = alloca
class basic_ostringstream;
template <class _Elem, class _Traits = char_traits<_Elem>, class _Alloc = allocator<_Elem>>
class basic_stringstream;
#if _HAS_CXX23
template <class _Elem, class _Traits = char_traits<_Elem>>
class basic_spanbuf;
template <class _Elem, class _Traits = char_traits<_Elem>>
class basic_ispanstream;
template <class _Elem, class _Traits = char_traits<_Elem>>
class basic_ospanstream;
template <class _Elem, class _Traits = char_traits<_Elem>>
class basic_spanstream;
#endif // _HAS_CXX23
miscco marked this conversation as resolved.
Show resolved Hide resolved
template <class _Elem, class _Traits = char_traits<_Elem>>
class basic_filebuf;
template <class _Elem, class _Traits = char_traits<_Elem>>
Expand Down Expand Up @@ -236,6 +246,12 @@ using fstream = basic_fstream<char, char_traits<char>>;
using syncbuf = basic_syncbuf<char>;
using osyncstream = basic_osyncstream<char>;
#endif // _HAS_CXX20
#if _HAS_CXX23
using spanbuf = basic_spanbuf<char>;
using ispanstream = basic_ispanstream<char>;
using ospanstream = basic_ospanstream<char>;
using spanstream = basic_spanstream<char>;
#endif // _HAS_CXX23

// wchar_t TYPEDEFS
using wios = basic_ios<wchar_t, char_traits<wchar_t>>;
Expand All @@ -255,6 +271,12 @@ using wfstream = basic_fstream<wchar_t, char_traits<wchar_t>>;
using wsyncbuf = basic_syncbuf<wchar_t>;
using wosyncstream = basic_osyncstream<wchar_t>;
#endif // _HAS_CXX20
#if _HAS_CXX23
using wspanbuf = basic_spanbuf<wchar_t>;
using wispanstream = basic_ispanstream<wchar_t>;
using wospanstream = basic_ospanstream<wchar_t>;
using wspanstream = basic_spanstream<wchar_t>;
#endif // _HAS_CXX23

#if defined(_CRTBLD)
// unsigned short TYPEDEFS
Expand Down
Loading