-
Notifications
You must be signed in to change notification settings - Fork 751
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
[LWG 1] P3504R0 C++ Standard Library Ready Issues #7459
Open
burblebee
wants to merge
35
commits into
main
Choose a base branch
from
motions-2024-11-lwg-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+201
−145
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
2a43f62
LWG3436 std::construct_at should support arrays
burblebee 1ef0eb3
LWG3899 co_yielding elements of an lvalue generator is unnecessarily …
burblebee a5f24f3
LWG3900 The allocator_arg_t overloads of generator::promise_type::ope…
burblebee 8dc94df
LWG3918 std::uninitialized_move/_n and guaranteed copy elision
burblebee 562a3be
LWG4014 LWG 3809 changes behavior of some existing std::subtract_with…
burblebee 63bf48b
LWG4024 Underspecified destruction of objects created in std::make_sh…
burblebee 0cc6ae5
LWG4027 possibly-const-range should prefer returning const R&
burblebee 60e8aa7
LWG4044 Confusing requirements for std::print on POSIX platforms
burblebee a77c52d
LWG4064 Clarify that std::launder is not needed when using the result…
burblebee 4ed7697
LWG4072 std::optional comparisons: constrain harder
burblebee 8aa46dc
LWG4085 ranges::generate_random's helper lambda should specify the re…
burblebee 136065f
LWG4112 has-arrow should required operator->() to be const-qualified
burblebee 4dc10a5
LWG4134 Issue with Philox algorithm specification
burblebee 2137507
LWG4154 The Mandates for std::packaged_task's constructor from a call…
burblebee 71b9526
LWG4164 Missing guarantees for forward_list modifiers
burblebee de80974
LWG3216 Rebinding the allocator before calling construct/destroy in a…
burblebee 3edfff7
LWG3886 Monad mo' problems
burblebee 30068ea
LWG4084 std::fixed ignores std::uppercase
burblebee 0ec58e8
LWG4088 println ignores the locale imbued in std::ostream
burblebee d44cfff
LWG4113 Disallow has_unique_object_representations<Incomplete[]>
burblebee 21f988b
LWG4119 generator::promise_type::yield_value(ranges::elements_of<R, A…
burblebee c1445bc
LWG4124 Cannot format zoned_time with resolution coarser than seconds
burblebee 3ed48ae
LWG4126 Some feature-test macros for fully freestanding features are …
burblebee ba5e36f
LWG4135 The helper lambda of std::erase for list should specify retur…
burblebee 0116785
LWG4140 Useless default constructors for bit reference types
burblebee 5437db0
LWG4141 Improve prohibitions on "additional storage"
burblebee 49fc523
LWG4142 format_parse_context::check_dynamic_spec should require at le…
burblebee 8c53feb
LWG4144 Disallow unique_ptr<T&, D>
burblebee 0f752fb
LWG4147 Precondition on inplace_vector::emplace
burblebee 72ba8da
LWG4148 unique_ptr::operator* should not allow dangling references
burblebee d6a7096
LWG4153 Fix extra "-1" for philox_engine::max()
burblebee aa454e0
LWG4157 The resolution of LWG3465 was damaged by P2167R3
burblebee c70aad0
LWG4169 std::atomic<T>'s default constructor should be constrained
burblebee b3e60b8
LWG4170 contiguous_iterator should require to_address(I{})
burblebee 7820989
[ostream.formatted.print] Remove "only" in wording for LWG4044 as per…
burblebee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6816,7 +6816,7 @@ | |||||
\effects | ||||||
Equivalent to: | ||||||
\begin{codeblock} | ||||||
print(os, "{}\n", format(fmt, std::forward<Args>(args)...)); | ||||||
print(os, "{}\n", format(os.getloc(), fmt, std::forward<Args>(args)...)); | ||||||
\end{codeblock} | ||||||
\end{itemdescr} | ||||||
|
||||||
|
@@ -6854,25 +6854,31 @@ | |||||
without regard to the value of \tcode{os.exceptions()} and | ||||||
without turning on \tcode{ios_base::badbit} in the error state of \tcode{os}. | ||||||
\end{itemize} | ||||||
|
||||||
\par % This paragraph is part of the \effects clause. | ||||||
After constructing a \tcode{sentry} object, | ||||||
the function initializes a variable with automatic storage duration via | ||||||
\begin{codeblock} | ||||||
string out = vformat(os.getloc(), fmt, args); | ||||||
\end{codeblock} | ||||||
\begin{itemize} | ||||||
\item | ||||||
If the function is \tcode{vprint_unicode} and | ||||||
\tcode{os} is a stream that refers to a terminal capable of displaying Unicode | ||||||
\tcode{os} is a stream that refers to a terminal that | ||||||
is capable of displaying Unicode only via a native Unicode API, | ||||||
which is determined in an implementation-defined manner, | ||||||
flushes \tcode{os} and then | ||||||
writes \tcode{out} to the terminal using the native Unicode API; | ||||||
if \tcode{out} contains invalid code units, | ||||||
\indextext{undefined}% | ||||||
the behavior is undefined and | ||||||
implementations are encouraged to diagnose it. | ||||||
If the native Unicode API is used, | ||||||
the function flushes \tcode{os} before writing \tcode{out}. | ||||||
Otherwise (if \tcode{os} is not such a stream or | ||||||
the function is \tcode{vprint_nonunicode}), | ||||||
the behavior is undefined. | ||||||
\item | ||||||
Otherwise | ||||||
inserts the character sequence | ||||||
\range{out.begin()}{out.end()} into \tcode{os}. | ||||||
\end{itemize} | ||||||
|
||||||
\par % This paragraph is part of the \effects clause. | ||||||
If writing to the terminal or inserting into \tcode{os} fails, | ||||||
calls \tcode{os.setstate(ios_base::badbit)} | ||||||
(which may throw \tcode{ios_base::failure}). | ||||||
|
@@ -7837,28 +7843,27 @@ | |||||
Let \tcode{out} denote the character representation of | ||||||
formatting arguments provided by \tcode{args} | ||||||
formatted according to specifications given in \tcode{fmt}. | ||||||
If \tcode{stream} refers to a terminal capable of displaying Unicode, | ||||||
\begin{itemize} | ||||||
\item | ||||||
If \tcode{stream} refers to a terminal that | ||||||
is only capable of displaying Unicode via a native Unicode API, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
flushes \tcode{stream} and then | ||||||
writes \tcode{out} to the terminal using the native Unicode API; | ||||||
if \tcode{out} contains invalid code units, | ||||||
\indextext{undefined}% | ||||||
the behavior is undefined and | ||||||
implementations are encouraged to diagnose it. | ||||||
the behavior is undefined. | ||||||
\item | ||||||
Otherwise writes \tcode{out} to \tcode{stream} unchanged. | ||||||
If the native Unicode API is used, | ||||||
the function flushes \tcode{stream} before writing \tcode{out}. | ||||||
\end{itemize} | ||||||
Unconditionally unlocks \tcode{stream} on function exit. | ||||||
|
||||||
\xrefc{7.21.2}. | ||||||
|
||||||
\begin{note} | ||||||
On POSIX and Windows, \tcode{stream} referring to a terminal means that, | ||||||
respectively, | ||||||
\tcode{isatty(fileno(\linebreak{}stream))} and | ||||||
On Windows the native Unicode API is \tcode{WriteConsoleW} and | ||||||
\tcode{stream} referring to a terminal means that | ||||||
\tcode{GetConsoleMode(_get_osfhandle(_fileno(stream)), ...)} | ||||||
return nonzero. | ||||||
\end{note} | ||||||
\begin{note} | ||||||
On Windows, the native Unicode API is \tcode{WriteConsoleW}. | ||||||
returns nonzero. | ||||||
\end{note} | ||||||
|
||||||
\pnum | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1969,6 +1969,7 @@ | |
\item \tcode{to_address(a) == addressof(*a)}, | ||
\item \tcode{to_address(b) == to_address(a) + D(b - a)}, | ||
\item \tcode{to_address(c) == to_address(a) + D(c - a)}, | ||
\item \tcode{address(I\{\})} is well-defined, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
\item \tcode{ranges::iter_move(a)} has | ||
the same type, value category, and effects as \tcode{std::move(*a)}, and | ||
\item if \tcode{ranges::iter_swap(a, b)} is well-formed, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, the friend declarations were removed by #6427