Skip to content
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

Motions 2019 11 lwg 1: P1917R0 C++ Standard Library Issues to be moved in Belfast #3472

Merged
merged 27 commits into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
130a0f8
LWG3070 path::lexically_relative causes surprising results if a filen…
Nov 16, 2019
6a0aa70
LWG3103 Errors in taking subview of span should be ill-formed where p…
Nov 16, 2019
8fe698a
LWG3149 DefaultConstructible should require default initialization
Nov 16, 2019
72eaab8
LWG3190 std::allocator::allocate sometimes returns too little storage
Nov 16, 2019
cc01bf3
LWG3218 Modifier for %d parse flag does not match POSIX and format sp…
Nov 16, 2019
74baa7a
LWG3221 Result of year_month arithmetic with months is ambiguous
Nov 16, 2019
8f5e426
LWG3222 P0574R1 introduced preconditions on non-existent parameters
Nov 16, 2019
e4b368f
LWG3224 zoned_time constructor from TimeZonePtr does not specify init…
Nov 16, 2019
ed66cf1
LWG3225 zoned_time converting constructor shall not be noexcept
Nov 16, 2019
2e9b606
LWG3230 Format specifier %y/%Y is missing locale alternative versions
Nov 16, 2019
41b9174
LWG3231 year_month_day_last::day specification does not cover !ok() v…
Nov 16, 2019
1198bf1
LWG3232 Inconsistency in zoned_time deduction guides
Nov 16, 2019
f97967c
LWG3235 parse manipulator without abbreviation is not callable
Nov 16, 2019
b3a0832
LWG3241 chrono-spec grammar ambiguity in §[time.format]
Nov 16, 2019
829e25b
LWG3244 Constraints for Source in [fs.path.req] insufficiently constr…
Nov 16, 2019
3bae3e6
LWG3245 Unnecessary restriction on '%p' parse specifier
Nov 16, 2019
eebd5d2
LWG3246 What are the constraints on the template parameter of basic_f…
Nov 16, 2019
9cb04ed
LWG3253 basic_syncbuf::basic_syncbuf() should not be explicit
Nov 16, 2019
aeb4717
LWG3256 Feature testing macro for constexpr algorithms
Nov 16, 2019
8d94d05
LWG3257 Missing feature testing macro update from P0858
Nov 16, 2019
75ee91e
LWG3259 The definition of constexpr iterators should be adjusted
Nov 16, 2019
1106527
LWG3266 to_chars(bool) should be deleted
Nov 16, 2019
2233f9d
LWG3272 %I%p should parse/format duration since midnight
Nov 16, 2019
a3443c0
LWG3273 Specify weekday_indexed to range of [0, 7]
Nov 16, 2019
57f593f
LWG3274 Missing feature test macro for <span>
Nov 16, 2019
7d7ec23
LWG3276 Class split_view::outer_iterator::value_type should inherit f…
Nov 16, 2019
81f49eb
LWG3277 Pre-increment on prvalues is not a requirement of weakly_incr…
Nov 16, 2019
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
14 changes: 10 additions & 4 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9328,13 +9328,16 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Let \tcode{U} be the value type of \tcode{decltype(first)}.

\pnum
\requires
\begin{itemize}
\item
If \tcode{init} is provided,
\tcode{T} shall be \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible});
otherwise, \tcode{ForwardIterator1}'s value type
otherwise, \tcode{U}
shall be \oldconcept{MoveConstructible}.
\item
If \tcode{init} is provided, all of
Expand All @@ -9343,7 +9346,7 @@
\tcode{binary_op(*first, *first)}
shall be convertible to \tcode{T};
otherwise, \tcode{binary_op(*first, *first)}
shall be convertible to \tcode{ForwardIterator1}'s value type.
shall be convertible to \tcode{U}.
\item
\tcode{binary_op} shall neither invalidate iterators or subranges,
nor modify elements in
Expand Down Expand Up @@ -9491,13 +9494,16 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Let \tcode{U} be the value type of \tcode{decltype(first)}.

\pnum
\requires
\begin{itemize}
\item
If \tcode{init} is provided, \tcode{T} shall be
\oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible});
otherwise, \tcode{ForwardIterator1}'s value type shall be
otherwise, \tcode{U} shall be
\oldconcept{MoveConstructible}.
\item
If \tcode{init} is provided, all of
Expand All @@ -9508,7 +9514,7 @@
\end{itemize}
shall be convertible to \tcode{T};
otherwise, \tcode{binary_op(unary_op(*first), unary_op(*first))}
shall be convertible to \tcode{ForwardIterator1}'s value type.
shall be convertible to \tcode{U}.
\item
Neither \tcode{unary_op} nor \tcode{binary_op} shall
invalidate iterators or subranges, nor modify elements in
Expand Down
20 changes: 19 additions & 1 deletion source/concepts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,27 @@

\begin{itemdecl}
template<class T>
concept @\deflibconcept{default_constructible}@ = constructible_from<T>;
inline constexpr bool @\defexposconcept{is-default-initializable}@ = @\seebelow@; // \expos

template<class T>
concept @\deflibconcept{default_constructible}@ = constructible_from<T> &&
requires { T{}; } &&
@\exposconcept{is-default-initializable}@<T>;
\end{itemdecl}

\begin{itemdescr}
\pnum
For a type \tcode{T}, \tcode{\exposconcept{is-default-initializable}<T>} is \tcode{true}
if and only if the variable definition
\begin{codeblock}
T t;
\end{codeblock}
is well-formed for some invented variable \tcode{t};
otherwise it is \tcode{false}.
Access checking is performed as if in a context unrelated to \tcode{T}.
Only the validity of the immediate context of the variable initialization is considered.
\end{itemdescr}

\rSec2[concept.moveconstructible]{Concept \cname{move_constructible}}

\begin{itemdecl}
Expand Down
19 changes: 17 additions & 2 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10839,6 +10839,10 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
\mandates
\tcode{Count <= Extent} is \tcode{true}.

\pnum
\expects
\tcode{Count <= size()} is \tcode{true}.
Expand All @@ -10854,6 +10858,10 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
\mandates
\tcode{Count <= Extent} is \tcode{true}.

\pnum
\expects
\tcode{Count <= size()} is \tcode{true}.
Expand All @@ -10870,10 +10878,17 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
\mandates
\begin{codeblock}
Offset <= Extent && (Count == dynamic_extent || Count <= Extent - Offset)
\end{codeblock}
is \tcode{true}.

\pnum
\expects
\begin{codeblock}
Offset <= size() && (Count == dynamic_extent || Offset + Count <= size())
Offset <= size() && (Count == dynamic_extent || Count <= size() - Offset)
\end{codeblock}
is \tcode{true}.

Expand Down Expand Up @@ -10935,7 +10950,7 @@
\pnum
\expects
\begin{codeblock}
offset <= size() && (count == dynamic_extent || offset + count <= size())
offset <= size() && (count == dynamic_extent || count <= size() - offset)
\end{codeblock}
is \tcode{true}.

Expand Down
30 changes: 25 additions & 5 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10897,7 +10897,9 @@
using streambuf_type = basic_streambuf<charT, traits>;

// \ref{syncstream.syncbuf.cons}, construction and destruction
explicit basic_syncbuf(streambuf_type* obuf = nullptr)
basic_syncbuf()
: basic_syncbuf(nullptr) {}
explicit basic_syncbuf(streambuf_type* obuf)
: basic_syncbuf(obuf, Allocator()) {}
basic_syncbuf(streambuf_type*, const Allocator&);
basic_syncbuf(basic_syncbuf&&);
Expand Down Expand Up @@ -12404,7 +12406,9 @@

\pnum
Functions taking template parameters named \tcode{Source}
shall not participate in overload resolution unless either
shall not participate in overload resolution unless
\tcode{Source} denotes a type other than \tcode{path}, and
either
\begin{itemize}
\item
\tcode{Source} is a specialization of
Expand Down Expand Up @@ -13464,10 +13468,26 @@

\pnum
\effects
If \tcode{root_name() != base.root_name()} is \tcode{true}
or \tcode{is_absolute() != base.is_absolute()} is \tcode{true}
or \tcode{!has_root_directory() \&\& base.has_root_directory()} is \tcode{true},
If:
\begin{itemize}
\item
\tcode{root_name() != base.root_name()} is \tcode{true}, or

\item
\tcode{is_absolute() != base.is_absolute()} is \tcode{true}, or

\item
\tcode{!has_root_directory() \&\& base.has_root_directory()} is \tcode{true}, or

\item
any \grammarterm{filename} in
\tcode{relative_path()} or \tcode{base.relative_path()}
can be interpreted as a \grammarterm{root-name},
\end{itemize}
returns \tcode{path()}.
\begin{note}
On a POSIX implementation, no \grammarterm{filename} in a \grammarterm{relative-path} is acceptable as a \grammarterm{root-name}.
\end{note}
Determines the first mismatched element of \tcode{*this} and \tcode{base}
as if by:
\begin{codeblock}
Expand Down
8 changes: 2 additions & 6 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,7 @@
\indextext{iterator!constexpr}%
Iterators are called \defn{constexpr iterators}
if all operations provided to meet iterator category requirements
are constexpr functions, except for
\begin{itemize}
\item a pseudo-destructor call\iref{expr.prim.id.dtor}, and
\item the construction of an iterator with a singular value.
\end{itemize}
are constexpr functions.
\begin{note}
For example, the types ``pointer to \tcode{int}'' and
\tcode{reverse_iterator<int*>} are constexpr iterators.
Expand Down Expand Up @@ -1783,7 +1779,7 @@
\tcode{(a + D(x + y))} is equal to \tcode{((a + x) + y)}.
\item \tcode{(a + D(0))} is equal to \tcode{a}.
\item If \tcode{(a + D(n - 1))} is valid, then
\tcode{(a + n)} is equal to \tcode{++(a + D(n - 1))}.
\tcode{(a + n)} is equal to \tcode{[](I c)\{ return ++c; \}(a + D(n - 1))}.
\item \tcode{(b += -n)} is equal to \tcode{a}.
\item \tcode{(b -= n)} is equal to \tcode{a}.
\item \tcode{addressof(b -= n)} is equal to \tcode{addressof(b)}.
Expand Down
3 changes: 2 additions & 1 deletion source/ranges.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5200,7 +5200,8 @@
namespace std::ranges {
template<class V, class Pattern>
template<bool Const>
struct split_view<V, Pattern>::outer_iterator<Const>::value_type {
struct split_view<V, Pattern>::outer_iterator<Const>::value_type
: view_interface<value_type> {
private:
outer_iterator i_ = outer_iterator(); // \expos
public:
Expand Down
7 changes: 4 additions & 3 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@
// \libheader{map}, \libheader{set}, \libheader{unordered_map}, \libheader{unordered_set}
#define @\defnlibxname{cpp_lib_any}@ 201606L // also in \libheader{any}
#define @\defnlibxname{cpp_lib_apply}@ 201603L // also in \libheader{tuple}
#define @\defnlibxname{cpp_lib_array_constexpr}@ 201603L // also in \libheader{iterator}, \libheader{array}
#define @\defnlibxname{cpp_lib_array_constexpr}@ 201803L // also in \libheader{iterator}, \libheader{array}
#define @\defnlibxname{cpp_lib_as_const}@ 201510L // also in \libheader{utility}
#define @\defnlibxname{cpp_lib_atomic_flag_test}@ 201907L // also in \libheader{atomic}
#define @\defnlibxname{cpp_lib_atomic_is_always_lock_free}@ 201603L // also in \libheader{atomic}
Expand All @@ -578,10 +578,10 @@
#define @\defnlibxname{cpp_lib_concepts}@ 201806L // also in \libheader{concepts}
#define @\defnlibxname{cpp_lib_constexpr}@ 201811L
// also in any C++ library header from \tref{headers.cpp} or any C++ header for C library facilities from \tref{headers.cpp.c}
#define @\defnlibxname{cpp_lib_constexpr_algorithms}@ 201806L // also in \libheader{algorithm}
#define @\defnlibxname{cpp_lib_constexpr_dynamic_alloc}@ 201907L // also in \libheader{memory}
#define @\defnlibxname{cpp_lib_constexpr_invoke}@ 201907L // also in \libheader{functional}
#define @\defnlibxname{cpp_lib_constexpr_string}@ 201907L // also in \libheader{string}
#define @\defnlibxname{cpp_lib_constexpr_swap_algorithms}@ 201806L // also in \libheader{algorithm}
#define @\defnlibxname{cpp_lib_constexpr_vector}@ 201907L // also in \libheader{vector}
#define @\defnlibxname{cpp_lib_destroying_delete}@ 201806L // also in \libheader{new}
#define @\defnlibxname{cpp_lib_enable_shared_from_this}@ 201603L // also in \libheader{memory}
Expand Down Expand Up @@ -650,8 +650,9 @@
#define @\defnlibxname{cpp_lib_shared_timed_mutex}@ 201402L // also in \libheader{shared_mutex}
#define @\defnlibxname{cpp_lib_source_location}@ 201907L // also in \libheader{source_location}
#define @\defnlibxname{cpp_lib_spaceship}@ 201907L // also in \libheader{compare}
#define @\defnlibxname{cpp_lib_span}@ 201902L // also in \libheader{span}
#define @\defnlibxname{cpp_lib_string_udls}@ 201304L // also in \libheader{string}
#define @\defnlibxname{cpp_lib_string_view}@ 201606L // also in \libheader{string}, \libheader{string_view}
#define @\defnlibxname{cpp_lib_string_view}@ 201803L // also in \libheader{string}, \libheader{string_view}
#define @\defnlibxname{cpp_lib_three_way_comparison}@ 201711L // also in \libheader{compare}
#define @\defnlibxname{cpp_lib_to_array}@ 201907L // also in \libheader{array}
#define @\defnlibxname{cpp_lib_to_chars}@ 201611L // also in \libheader{charconv}
Expand Down
Loading