Skip to content

[LWG 3] P2790R0 Immediate issues except 3441 #6116

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

Merged
merged 32 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
08d1a06
LWG3622 Misspecified transitivity of equivalence in §[unord.req.general]
burblebee Feb 14, 2023
87062d5
[unord.req.general] Use Oxford comma in wording for LWG3622.
burblebee Feb 21, 2023
5502d2c
LWG3631 basic_format_arg(T&&) should use remove_cvref_t<T> throughout
burblebee Feb 14, 2023
8a0149a
LWG3645 resize_and_overwrite is overspecified to call its callback wi…
burblebee Feb 14, 2023
f8a9adc
LWG3655 The INVOKE operation and union types
burblebee Feb 14, 2023
776bbdb
LWG3723 priority_queue::push_range needs to append_range
burblebee Feb 14, 2023
afd3897
LWG3734 Inconsistency in inout_ptr and out_ptr for empty case
burblebee Feb 14, 2023
f3a8614
LWG3772 repeat_view's piecewise constructor is missing Postconditions
burblebee Feb 14, 2023
6138cb4
LWG3786 Flat maps' deduction guide needs to default Allocator to be u…
burblebee Feb 14, 2023
c3a0969
LWG3803 flat_foo constructors taking KeyContainer lack KeyCompare par…
burblebee Feb 15, 2023
5fc48b4
LWG3810 CTAD for std::basic_format_args
burblebee Feb 15, 2023
632a868
LWG3827 Deprecate <stdalign.h> and <stdbool.h> macros
burblebee Feb 15, 2023
18314e6
LWG3828 Sync intmax_t and uintmax_t with C2x
burblebee Feb 15, 2023
c1aa3d2
[cinttypes.syn] Use "," before "respectively" in wording for LWG3828.
burblebee Feb 21, 2023
8160812
LWG3833 Remove specialization template<size_t N> struct formatter<con…
burblebee Feb 15, 2023
052eab4
[diff.cpp20.utilities] Clean up codeblock after sentence for LWG3833.
burblebee Feb 21, 2023
093eb5e
LWG3836 std::expected<bool, E1> conversion constructor expected(const…
burblebee Feb 15, 2023
26183aa
LWG3843 std::expected<T,E>::value() & assumes E is copy constructible
burblebee Feb 15, 2023
29df82b
LWG3847 ranges::to can still return views
burblebee Feb 15, 2023
b71cc32
LWG3862 basic_const_iterator's common_type specialization is undercon…
burblebee Feb 15, 2023
045f6e9
LWG3865 Sorting a range of pairs
burblebee Feb 15, 2023
2a08af4
LWG3869 Deprecate std::errc constants related to UNIX STREAMS
burblebee Feb 15, 2023
fa30269
LWG3870 Remove voidify
burblebee Feb 15, 2023
74d0dca
LWG3871 Adjust note about terminate
burblebee Feb 15, 2023
94ed1f4
LWG3872 basic_const_iterator should have custom iter_move
burblebee Feb 15, 2023
17630da
LWG3875 std::ranges::repeat_view<T, IntegerClass>::iterator may be il…
burblebee Feb 15, 2023
2fa7a59
LWG3876 Default constructor of std::layout_XX::mapping misses precond…
burblebee Feb 15, 2023
1e27830
LWG3877 Incorrect constraints on const-qualified monadic overloads fo…
burblebee Feb 15, 2023
aaf544e
LWG3878 import std; should guarantee initialization of standard iostr…
burblebee Feb 15, 2023
5bbbaf8
LWG3879 erase_if for flat_{,multi}set is incorrectly specified
burblebee Feb 15, 2023
ef1d310
LWG3880 Clarify operator+= complexity for {chunk,stride}_view::iterator
burblebee Feb 15, 2023
89c1f6c
LWG3881 Incorrect formatting of container adapters backed by std::string
burblebee Feb 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10781,7 +10781,7 @@
\begin{codeblock}
template<class T>
constexpr void* @\placeholdernc{voidify}@(T& obj) noexcept {
return const_cast<void*>(static_cast<const volatile void*>(addressof(obj)));
return addressof(obj);
}
\end{codeblock}

Expand Down
13 changes: 13 additions & 0 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,19 @@
// implementation-defined number of \tcode{'*'} characters
\end{codeblock}

\diffref{format.formatter.spec}
\change
Removed the \tcode{formatter} specialization:
\begin{codeblock}
template<size_t N> struct formatter<const charT[N], charT>;
\end{codeblock}
\rationale
The specialization is inconsistent with the design of \tcode{formatter},
which is intended to be instantiated only with cv-unqualified object types.
\effect
Valid \CppXX{} code that instantiated the removed specialization
can become ill-formed.

\rSec2[diff.cpp20.strings]{\ref{strings}: strings library}

\diffref{string.classes}
Expand Down
415 changes: 324 additions & 91 deletions source/containers.tex

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions source/diagnostics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@
\indexlibraryglobal{ENETUNREACH}%
\indexlibraryglobal{ENFILE}%
\indexlibraryglobal{ENOBUFS}%
\indexlibraryglobal{ENODATA}%
\indexlibraryglobal{ENODEV}%
\indexlibraryglobal{ENOENT}%
\indexlibraryglobal{ENOEXEC}%
Expand All @@ -548,8 +547,6 @@
\indexlibraryglobal{ENOMSG}%
\indexlibraryglobal{ENOPROTOOPT}%
\indexlibraryglobal{ENOSPC}%
\indexlibraryglobal{ENOSR}%
\indexlibraryglobal{ENOSTR}%
\indexlibraryglobal{ENOSYS}%
\indexlibraryglobal{ENOTCONN}%
\indexlibraryglobal{ENOTDIR}%
Expand All @@ -571,7 +568,6 @@
\indexlibraryglobal{EROFS}%
\indexlibraryglobal{ESPIPE}%
\indexlibraryglobal{ESRCH}%
\indexlibraryglobal{ETIME}%
\indexlibraryglobal{ETIMEDOUT}%
\indexlibraryglobal{ETXTBSY}%
\indexlibraryglobal{EWOULDBLOCK}%
Expand Down Expand Up @@ -619,7 +615,6 @@
#define ENETUNREACH @\seebelow@
#define ENFILE @\seebelow@
#define ENOBUFS @\seebelow@
#define ENODATA @\seebelow@
#define ENODEV @\seebelow@
#define ENOENT @\seebelow@
#define ENOEXEC @\seebelow@
Expand All @@ -629,8 +624,6 @@
#define ENOMSG @\seebelow@
#define ENOPROTOOPT @\seebelow@
#define ENOSPC @\seebelow@
#define ENOSR @\seebelow@
#define ENOSTR @\seebelow@
#define ENOSYS @\seebelow@
#define ENOTCONN @\seebelow@
#define ENOTDIR @\seebelow@
Expand All @@ -652,7 +645,6 @@
#define EROFS @\seebelow@
#define ESPIPE @\seebelow@
#define ESRCH @\seebelow@
#define ETIME @\seebelow@
#define ETIMEDOUT @\seebelow@
#define ETXTBSY @\seebelow@
#define EWOULDBLOCK @\seebelow@
Expand Down Expand Up @@ -750,18 +742,15 @@
no_child_process, // \tcode{ECHILD}
no_link, // \tcode{ENOLINK}
no_lock_available, // \tcode{ENOLCK}
no_message_available, // \tcode{ENODATA}
no_message, // \tcode{ENOMSG}
no_protocol_option, // \tcode{ENOPROTOOPT}
no_space_on_device, // \tcode{ENOSPC}
no_stream_resources, // \tcode{ENOSR}
no_such_device_or_address, // \tcode{ENXIO}
no_such_device, // \tcode{ENODEV}
no_such_file_or_directory, // \tcode{ENOENT}
no_such_process, // \tcode{ESRCH}
not_a_directory, // \tcode{ENOTDIR}
not_a_socket, // \tcode{ENOTSOCK}
not_a_stream, // \tcode{ENOSTR}
not_connected, // \tcode{ENOTCONN}
not_enough_memory, // \tcode{ENOMEM}
not_supported, // \tcode{ENOTSUP}
Expand All @@ -779,7 +768,6 @@
resource_unavailable_try_again, // \tcode{EAGAIN}
result_out_of_range, // \tcode{ERANGE}
state_not_recoverable, // \tcode{ENOTRECOVERABLE}
stream_timeout, // \tcode{ETIME}
text_file_busy, // \tcode{ETXTBSY}
timed_out, // \tcode{ETIMEDOUT}
too_many_files_open_in_system, // \tcode{ENFILE}
Expand Down
55 changes: 55 additions & 0 deletions source/future.tex
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,25 @@
unless the function's \throws element
specifies throwing an exception when the precondition is violated.

\rSec1[depr.c.macros]{Deprecated C macros}

\pnum
The header \libheader{stdalign.h} has the following macro:
\indexheader{stdalign.h}%
\indexlibraryglobal{__alignas_is_defined}%
\begin{codeblock}
#define @\xname{alignas_is_defined}@ 1
\end{codeblock}

\pnum
The header \libheader{stdbool.h} has the following macro:
\indexheader{stdbool.h}%
\indexhdr{stdbool.h}%
\indexlibraryglobal{__bool_true_false_are_defined}%
\begin{codeblock}
#define @\xname{bool_true_false_are_defined}@ 1
\end{codeblock}

\rSec1[depr.relops]{Relational operators}%
\indexlibraryglobal{rel_ops}%

Expand Down Expand Up @@ -1322,6 +1341,42 @@
\tcode{rdbuf()->pcount()}.
\end{itemdescr}

\rSec1[depr.cerrno]{Deprecated error numbers}

\pnum
The following macros are defined in addition to those
specified in \ref{cerrno.syn}:

\indexlibraryglobal{ENODATA}%
\indexlibraryglobal{ENOSR}%
\indexlibraryglobal{ENOSTR}%
\indexlibraryglobal{ETIME}%
\begin{codeblock}
#define ENODATA @\seebelow@
#define ENOSR @\seebelow@
#define ENOSTR @\seebelow@
#define ETIME @\seebelow@
\end{codeblock}

\pnum
The meaning of these macros is defined by the POSIX standard.

\pnum
The following \tcode{enum errc} enumerators are defined
in addition to those specified in \ref{system.error.syn}:

\begin{codeblock}
no_message_available, // \tcode{ENODATA}
no_stream_resources, // \tcode{ENOSR}
not_a_stream, // \tcode{ENOSTR}
stream_timeout, // \tcode{ETIME}
\end{codeblock}

\pnum
The value of each \tcode{enum errc} enumerator above
is the same as the value of the \libheader{cerrno} macro
shown in the above synopsis.

\rSec1[depr.default.allocator]{The default allocator}

\pnum
Expand Down
15 changes: 15 additions & 0 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,17 @@
The results of including \libheader{iostream} in a translation unit shall be as if
\libheader{iostream} defined an instance of \tcode{ios_base::Init} with static
storage duration.
Each \Cpp{} library module\iref{std.modules} in a hosted implementation
shall behave as if it contains an interface unit that
defines an unexported \tcode{ios_base::Init} variable with
ordered initialization\iref{basic.start.dynamic}.

\begin{note}
As a result, the definition of that variable is appearance-ordered before
any declaration following the point of importation of a \Cpp{} library module.
Whether such a definition exists is unobservable by a program that
does not reference any of the standard iostream objects.
\end{note}

\pnum
Mixing operations on corresponding wide- and narrow-character streams
Expand Down Expand Up @@ -18592,6 +18603,10 @@
The header \libheader{cinttypes} includes the header \libheaderref{cstdint} instead
of \libheader{stdint.h}, and
\item
\tcode{intmax_t} and \tcode{uintmax_t} are not required
to be able to represent all values of extended integer types
wider than \tcode{long long} and \tcode{unsigned long long}, respectively, and
\item
if and only if the type \tcode{intmax_t} designates an extended integer
type\iref{basic.fundamental}, the following function signatures are added:
\begin{codeblock}
Expand Down
14 changes: 14 additions & 0 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,17 @@
class basic_const_iterator; // freestanding

template<class T, @\libconcept{common_with}@<T> U>
requires @\libconcept{input_iterator}@<common_type_t<T, U>>
struct common_type<basic_const_iterator<T>, U> { // freestanding
using type = basic_const_iterator<common_type_t<T, U>>;
};
template<class T, @\libconcept{common_with}@<T> U>
requires @\libconcept{input_iterator}@<common_type_t<T, U>>
struct common_type<U, basic_const_iterator<T>> { // freestanding
using type = basic_const_iterator<common_type_t<T, U>>;
};
template<class T, @\libconcept{common_with}@<T> U>
requires @\libconcept{input_iterator}@<common_type_t<T, U>>
struct common_type<basic_const_iterator<T>, basic_const_iterator<U>> { // freestanding
using type = basic_const_iterator<common_type_t<T, U>>;
};
Expand Down Expand Up @@ -4213,10 +4216,16 @@
template<class I>
concept @\exposconcept{not-a-const-iterator}@ = @\seebelow@; // \expos

template<@\libconcept{indirectly_readable}@ I>
using @\exposidnc{iter-const-rvalue-reference-t}@ = // \expos
common_reference_t<const iter_value_t<I>&&, iter_rvalue_reference_t<I>>;

template<@\libconcept{input_iterator}@ Iterator>
class @\libglobal{basic_const_iterator}@ {
Iterator @\exposidnc{current_}@ = Iterator(); // \expos
using @\exposidnc{reference}@ = iter_const_reference_t<Iterator>; // \expos
using @\exposidnc{rvalue-reference}@ = // \expos
@\exposid{iter-const-rvalue-reference-t}@<Iterator>;

public:
using iterator_concept = @\seebelow@;
Expand Down Expand Up @@ -4312,6 +4321,11 @@
template<@\exposconcept{not-a-const-iterator}@ S>
requires @\libconcept{sized_sentinel_for}@<S, Iterator>
friend constexpr difference_type operator-(const S& x, const basic_const_iterator& y);
friend constexpr @\exposid{rvalue-reference}@ iter_move(const basic_const_iterator& i)
noexcept(noexcept(static_cast<@\exposid{rvalue-reference}@>(ranges::iter_move(i.@\exposid{current_}@))))
{
return static_cast<@\exposid{rvalue-reference}@>(ranges::iter_move(i.@\exposid{current_}@));
}
};
}
\end{codeblock}
Expand Down
9 changes: 0 additions & 9 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1471,15 +1471,6 @@
the freestanding items\iref{freestanding.item} declared in the header.
\indextext{implementation!freestanding|)}%

\pnum
\begin{note}
Throwing a standard library provided exception
is not observably different from \tcode{terminate()}
if the implementation does not
unwind the stack during exception handling\iref{except.handle} and
the user's program contains no catch blocks.
\end{note}

\rSec2[using]{Using the library}

\rSec3[using.overview]{Overview}
Expand Down
18 changes: 18 additions & 0 deletions source/memory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4993,6 +4993,24 @@
Initializes \tcode{s} with \tcode{smart},
\tcode{a} with \tcode{std::forward<Args>(args)...}, and
value-initializes \tcode{p}.
Then, equivalent to:
\begin{itemize}
\item
\begin{codeblock}
s.reset();
\end{codeblock}
if the expression \tcode{s.reset()} is well-formed;

\item
otherwise,
\begin{codeblock}
s = Smart();
\end{codeblock}
if \tcode{is_constructible_v<Smart>} is \tcode{true};

\item
otherwise, the program is ill-formed.
\end{itemize}

\pnum
\begin{note}
Expand Down
Loading