Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Mar 18, 2024

Notes:

  • handle's constructor is exposition only and private in the standard wording ([format.arg]/10), so at least the constructor shouldn't be callable from user code. Removing static_assert messages due to this.
  • The standard wording seemingly leaves special member functions of basic_format_context implicitly declared ([format.context]), which means that its default constructor should be declared and defaulted.
  • Internal non-Standard constructors of basic_format_context are changed to take references to avoid double copy/move.
  • Now constructions of basic_format_arg, handle, and basic_format_context are consistently performed by _Make_from static member functions, and _Make_from functions are consistently marked _NODISCARD.

`basic_format_arg::handle` and `basic_format_context`
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner March 18, 2024 17:21
@StephanTLavavej StephanTLavavej self-assigned this Mar 18, 2024
@StephanTLavavej StephanTLavavej added enhancement Something can be improved format C++20/23 format labels Mar 18, 2024
@StephanTLavavej
Copy link
Member

/azp run STL-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@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 243cffc into microsoft:main Mar 19, 2024
@StephanTLavavej
Copy link
Member

Thanks for improving <format>'s strictness! 🔒 📈 😻

@frederick-vs-ja frederick-vs-ja deleted the format-non-standard-ctor branch March 19, 2024 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved format C++20/23 format

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants