Skip to content

Speculatively implement LWG-3857 - #3348

Merged
Stephan T. Lavavej (StephanTLavavej) merged 7 commits into
microsoft:mainfrom
frederick-vs-ja:lwg-3857
Jan 22, 2023
Merged

Speculatively implement LWG-3857#3348
Stephan T. Lavavej (StephanTLavavej) merged 7 commits into
microsoft:mainfrom
frederick-vs-ja:lwg-3857

Conversation

@frederick-vs-ja

@frederick-vs-ja A. Jiang (frederick-vs-ja) commented Jan 16, 2023

Copy link
Copy Markdown
Contributor

Fixes #3336.

The involved constructor of basic_string_view is introduced in C++23, so this PR also fixes the issue in C++20 mode in an alternative way.

Also updates references to working darft in <format> to WG21-N4928.

@frederick-vs-ja
A. Jiang (frederick-vs-ja) requested a review from a team as a code owner January 16, 2023 01:46
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added LWG Library Working Group issue format C++20/23 format labels Jan 18, 2023
Comment thread stl/inc/format Outdated
And update references to WG21-N4928.

Co-authored-by: S. B. Tam <cpplearner@outlook.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do also appreciate the C++20 workaround. I personally think it's the best way forward.

Comment thread tests/std/tests/P0645R10_text_formatting_formatting/test.cpp Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

Looks great, thanks! I pushed a trivial commit to unqualify std::allocator in the test.

@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 4f5d13a into microsoft:main Jan 22, 2023
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for improving basic_string_view's usability! 😸 🧵 🧶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

format C++20/23 format LWG Library Working Group issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<format>: Failure to format basic_string_view with non-standard traits

4 participants