[PATCH] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-17 Thread Nathan Myers
[Note: many of the tests for the original versions do not make sense, require different outcomes, or otherwise fail on the new versions for reasons not obvious.] Add non-type template parameter function-object/-pointer argument versions of bind_front, bind_back, and not_fn as defined in P2714R1.

[SNAPv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-07 Thread Nathan Myers
This is a snapshot of work in progress, for reference. bind_front(...) is uglified directly from the sample implementation in P2714, at include/std/functional:1284 . Test failures: bind_front/1.cc:53: error: static assertion failed bind_front/1.cc:57: error: static assertion failed bind_front/1.c

[PATCH] libstdc++: provide debug impl of P2697 ctor [PR119742]

2025-07-07 Thread Nathan Myers
This adds the new bitset constructor from string_view defined in P2697 to the debug version of the type. libstdc++-v3/Changelog: PR libstdc++/119742 * include/debug/bitset: Add new ctor. --- libstdc++-v3/include/debug/bitset | 12 1 file changed, 12 insertions(+) dif

[SNAPv3] libstdc++: Add NTTP bind_front, _back (P2714) [PR119744]

2025-07-03 Thread Nathan Myers
This is a snapshot of work on P2714 "Bind front and back to NTTP callables", posted for reference. Questions: 1. Jonathan asks if __type_forward_like_t does the same job as __like_t in bits/move.h. 2. Could the "if constexpr" statements be better expressed as requires clauses via the A=>B == !A||B

[SNAPv2] libstdc++: Add NTTP bind_front, _back (P2714) [PR119744]

2025-07-03 Thread Nathan Myers
This is a snapshot of work on P2714 "Bind front and back to NTTP callables", posted for reference. Not tested. libstdc++-v3/ChangeLog: PR libstdc++/119744 * include/bits/version.def: Redefine __cpp_lib_bind_front etc. * include/bits/version.h: Ditto. * include/std/f

[SNAP] libstdc++: Add NTTP bind_front, _back (P2714) [PR119744]

2025-07-03 Thread Nathan Myers
This is a snapshot of work on P2714 "Bind front and back to NTTP callables", posted for reference. Not tested. libstdc++-v3/ChangeLog: PR libstdc++/119744 * include/bits/version.def: Redefine __cpp_lib_bind_front etc. * include/bits/version.h: Ditto. * include/std/f

[PATCH v2] libstdc++: construct bitset from string_view (P2697) [PR119742]

2025-07-02 Thread Nathan Myers
Changes in V2: * Generalize private member _M_check_initial_position for use with both string and string_view arguments. * Remove unnecessary #if guards for version and hostedness. * Remove redundant "std::" qualifications in new code. * Improve Doxygen source readability. * Clarify commit messag

[PATCH] libstdc++: make range view ctors explicit (P2711) [PR119744]

2025-07-01 Thread Nathan Myers
Make range view constructors explicit, per P2711. Technically, this is a breaking change, but it is unlikely to break any production code, as reliance on non-explicit construction is unidiomatic.. libstdc++-v3/ChangeLog PR libstdc++/119744 * include/std/ranges: view ctors become ex

[PATCH] libstdc++: construct bitset from string_view (P2697) [PR119742]

2025-07-01 Thread Nathan Myers
Add a bitset constructor from string_view, with other arguments matching the constructor from string. Test in ways that exercise code paths not checked in existing tests for other constructors. Fix existing tests that would fail to detect incorrect exception behavior. libstdc++-v3/ChangeLog:

Reverted. (was Re: [PATCH v4] libstdc++: stringstream ctors from string_view [PR119741])

2025-06-04 Thread Nathan Myers
On 6/4/25 20:30, H.J. Lu wrote: On Wed, Jun 4, 2025 at 8:02 PM Jonathan Wakely wrote: On Thu, 29 May 2025 at 20:30, Nathan Myers wrote: Change in V4: * Rename tests to string_view.cc * Adapt tests to cons/wchar_t directories * Define symbol __cpp_lib_sstream_from_string_view as

[PATCH v4] libstdc++: stringstream ctors from string_view [PR119741]

2025-05-29 Thread Nathan Myers
Change in V4: * Rename tests to string_view.cc * Adapt tests to cons/wchar_t directories * Define symbol __cpp_lib_sstream_from_string_view as 202406 * Define symbol __glibcxx_want_sstream_from_string_view before version.h * Include version.h after other includes * No include type_traits * D

[PATCH v3] libstdc++: Implement stringstream from string_view [PR119741]

2025-05-29 Thread Nathan Myers
Change in V3: * Comment that p2495 specifies a drive-by constraint omitted as redundant * Adjust whitespace to fit in 80 columns Change in V2: * apply all review comments * remove redundant drive-by "requires" on ctor from string allocator arg * check allocators are plumbed through -- >8 --

[PATCH v2] libstdc++: Implement stringstream from string_view [PR119741]

2025-05-29 Thread Nathan Myers
Change in V2: * apply all review comments * remove redundant drive-by "requires" on ctor from string allocator arg * check allocators are plumbed through -- >8 -- Implement PR libstdc++/119741 (P2495R3) Add constructors to stringbuf, stringstream, istringstream, and ostringstream, and a matchi

[PATCH] libstdc++: Implement stringstream from string_view [P2495R3]

2025-05-19 Thread Nathan Myers
..ac0ff4a386f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -41,6 +41,17 @@ PR libstdc++/119246 * include/std/format: Updated check for _GLIBCXX_FORMAT_F128. +2025-05-14 Nathan Myers + P2495R3 stringstream to init from string_view-ish + * include

[PATCH] libstdc++: Implement stringstream from string_view [P2495R3]

2025-05-19 Thread Nathan Myers
..ac0ff4a386f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -41,6 +41,17 @@ PR libstdc++/119246 * include/std/format: Updated check for _GLIBCXX_FORMAT_F128. +2025-05-14 Nathan Myers + P2495R3 stringstream to init from string_view-ish + * include