Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Jan 16, 2023

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 frederick-vs-ja requested a review from a team as a code owner January 16, 2023 01:46
@StephanTLavavej StephanTLavavej added LWG Library Working Group issue format C++20/23 format labels Jan 18, 2023
frederick-vs-ja and others added 2 commits January 18, 2023 17:20
And update references to WG21-N4928.

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

@strega-nil-ms strega-nil-ms left a comment

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.

@StephanTLavavej StephanTLavavej self-assigned this Jan 18, 2023
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej merged commit 4f5d13a into microsoft:main Jan 22, 2023
@StephanTLavavej
Copy link
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