Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
95df15d
LWG3194 ConvertibleTo prose does not match code
Feb 14, 2020
707c2d5
LWG3233 Broken requirements for shared_ptr converting constructors
Feb 14, 2020
a7f2dd6
LWG3254 Strike stop_token's operator!=
Feb 14, 2020
c99a776
LWG3264 sized_range and ranges::size redundantly use disable_sized_range
Feb 14, 2020
a28b300
LWG3280 View converting constructors can cause constraint recursion a…
Feb 14, 2020
94a94e3
LWG3284 random_access_iterator semantic constraints accidentally prom…
Feb 14, 2020
7b2e123
LWG3285 The type of a customization point object shall satisfy semire…
Feb 14, 2020
095a764
LWG3286 ranges::size is not required to be valid after a call to rang…
Feb 14, 2020
5bd6da1
LWG3291 iota_view::iterator has the wrong iterator_category
Feb 14, 2020
ae15dd1
LWG3292 iota_view is under-constrained
Feb 14, 2020
09c20d9
LWG3294 zoned_time deduction guides misinterprets string/char*
Feb 14, 2020
a9d4809
LWG3296 Inconsistent default argument for basic_regex<>::assign
Feb 14, 2020
fdd34db
LWG3299 Pointers don't need customized iterator behavior
Feb 14, 2020
b7f07b3
LWG3300 Non-array ssize overload is underconstrained
Feb 14, 2020
5a66090
LWG3302 Range adaptor objects keys and values are unspecified
Feb 14, 2020
d3ce1fc
LWG3303 Bad "constexpr" marker for destroy/destroy_n
Feb 14, 2020
1cec867
LWG3304 Allocate functions of std::polymorphic_allocator should requi…
Feb 14, 2020
b3d809a
LWG3307 std::allocator<void>().allocate(n)
Feb 14, 2020
31e9bb0
LWG3310 Replace SIZE_MAX with numeric_limits<size_t>::max()
Feb 14, 2020
b561e61
LWG3313 join_view::iterator::operator-- is incorrectly constrained
Feb 14, 2020
ebd893b
LWG3315 Correct Allocator Default Behavior
Feb 14, 2020
5518e72
LWG3316 Correctly define epoch for utc_clock / utc_timepoint
Feb 14, 2020
8662855
LWG3317 Incorrect operator<< for floating-point durations
Feb 14, 2020
bd57d9c
LWG3318 Clarify whether clocks can represent time before their epoch
Feb 14, 2020
41e73c4
LWG3319 Properly reference specification of IANA time zone database
Feb 14, 2020
6faa9cf
LWG3320 span::cbegin/cend methods produce different results than std:…
Feb 14, 2020
f3199a9
LWG3321 uninitialized_construct_using_allocator should use construct_at
Feb 14, 2020
74487d3
LWG3323 has-tuple-element helper concept needs convertible_to
Feb 14, 2020
099d550
LWG3324 Special-case std::strong/weak/partial_order for pointers
Feb 14, 2020
a72b900
LWG3325 Constrain return type of transformation function for transfor…
Feb 14, 2020
3777012
LWG3326 enable_view has false positives
Feb 14, 2020
862d446
LWG3327 Format alignment specifiers vs. text direction
Feb 14, 2020
43e9566
LWG3329 totally_ordered_with both directly and indirectly requires co…
Feb 14, 2020
abaa67f
LWG3330 Include <compare> from most library headers
Feb 14, 2020
6f9fcd3
LWG3331 Define totally_ordered/_with in terms of partially-ordered-with
Feb 14, 2020
68a6fd2
LWG3332 Issue in [time.format]
Feb 14, 2020
f426a14
LWG3338 Rename default_constructible to default_initializable
Feb 14, 2020
84c829b
LWG3346 pair and tuple copy and move constructor have backwards speci…
Feb 14, 2020
1fca6b1
LWG3349 Missing __cpp_lib_constexpr_complex for P0415R1
Feb 14, 2020
4199b05
LWG3350 Simplify return type of lexicographical_compare_three_way
Feb 14, 2020
6139589
LWG3351 ranges::enable_safe_range should not be constrained
Feb 14, 2020
901833b
LWG3356 __cpp_lib_nothrow_convertible should be __cpp_lib_is_nothrow_…
Feb 14, 2020
de58af8
LWG3360 three_way_comparable_with is inconsistent with similar concepts
Feb 14, 2020
090d7d8
[allocator.uses.construction] Give a name to generic lambda type
Feb 21, 2020
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
4 changes: 2 additions & 2 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2846,7 +2846,7 @@
lexicographical_compare_three_way(InputIterator1 b1, InputIterator1 e1,
InputIterator2 b2, InputIterator2 e2,
Cmp comp)
-> common_comparison_category_t<decltype(comp(*b1, *b2)), strong_ordering>;
-> decltype(comp(*b1, *b2));
template<class InputIterator1, class InputIterator2>
constexpr auto
lexicographical_compare_three_way(InputIterator1 b1, InputIterator1 e1,
Expand Down Expand Up @@ -8444,7 +8444,7 @@
lexicographical_compare_three_way(InputIterator1 b1, InputIterator1 e1,
InputIterator2 b2, InputIterator2 e2,
Cmp comp)
-> common_comparison_category_t<decltype(comp(*b1, *b2)), strong_ordering>;
-> decltype(comp(*b1, *b2));
\end{itemdecl}

\begin{itemdescr}
Expand Down
3 changes: 3 additions & 0 deletions source/back.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ \chapter{Bibliography}

\begin{itemize}
\renewcommand{\labelitemi}{---}
\item
IANA Time Zone Database,
available at \url{https://www.iana.org/time-zones}
\item
ISO/IEC 10967-1:2012,
\doccite{Information technology --- Language independent arithmetic ---
Expand Down
57 changes: 21 additions & 36 deletions source/concepts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@
template<class T, class... Args>
concept constructible_from = @\seebelow@;

// \ref{concept.defaultconstructible}, concept \libconcept{default_constructible}
// \ref{concept.default.init}, concept \libconcept{default_initializable}
template<class T>
concept default_constructible = @\seebelow@;
concept default_initializable = @\seebelow@;

// \ref{concept.moveconstructible}, concept \libconcept{move_constructible}
template<class T>
Expand Down Expand Up @@ -314,29 +314,33 @@
\rSec2[concept.convertible]{Concept \cname{convertible_to}}

\pnum
The \libconcept{convertible_to} concept requires an expression of a particular
type and value category to be both implicitly and explicitly convertible to some
other type. The implicit and explicit conversions are required to produce equal
Given types \tcode{From} and \tcode{To} and
an expression \tcode{E} such that
\tcode{decltype((E))} is \tcode{add_rvalue_reference_t<From>},
\tcode{\libconcept{convertible_to}<From, To>} requires \tcode{E}
to be both implicitly and explicitly convertible to type \tcode{To}.
The implicit and explicit conversions are required to produce equal
results.

\begin{itemdecl}
template<class From, class To>
concept @\deflibconcept{convertible_to}@ =
is_convertible_v<From, To> &&
requires(From (&f)()) {
requires(add_rvalue_reference_t<From> (&f)()) {
static_cast<To>(f());
};
\end{itemdecl}

\begin{itemdescr}
\pnum
Let \tcode{test} be the invented function:
Let \tcode{FromR} be \tcode{add_rvalue_reference_t<From>} and
\tcode{test} be the invented function:
\begin{codeblock}
To test(From (&f)()) {
To test(FromR (&f)()) {
return f();
}
\end{codeblock}
and let \tcode{f} be a function with no arguments and return type \tcode{From}
and let \tcode{f} be a function with no arguments and return type \tcode{FromR}
such that \tcode{f()} is equality-preserving.
Types \tcode{From} and \tcode{To} model \tcode{\libconcept{convertible_to}<From, To>}
only if:
Expand All @@ -347,11 +351,11 @@
\tcode{static_cast<To>(f())} is equal to \tcode{test(f)}.

\item
\tcode{From} is not a reference-to-object type, or
\tcode{FromR} is not a reference-to-object type, or

\begin{itemize}
\item
If \tcode{From} is an rvalue reference to a non const-qualified type, the
If \tcode{FromR} is an rvalue reference to a non const-qualified type, the
resulting state of the object referenced by \tcode{f()} after either above
expression is valid but unspecified\iref{lib.types.movedfrom}.

Expand Down Expand Up @@ -735,14 +739,14 @@
concept @\deflibconcept{constructible_from}@ = destructible<T> && is_constructible_v<T, Args...>;
\end{itemdecl}

\rSec2[concept.defaultconstructible]{Concept \cname{default_constructible}}
\rSec2[concept.default.init]{Concept \cname{default_initializable}}

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

template<class T>
concept @\deflibconcept{default_constructible}@ = constructible_from<T> &&
concept @\deflibconcept{default_initializable}@ = constructible_from<T> &&
requires { T{}; } &&
@\exposconcept{is-default-initializable}@<T>;
\end{itemdecl}
Expand Down Expand Up @@ -957,14 +961,7 @@
\begin{itemdecl}
template<class T>
concept @\deflibconcept{totally_ordered}@ =
equality_comparable<T> &&
requires(const remove_reference_t<T>& a,
const remove_reference_t<T>& b) {
{ a < b } -> boolean;
{ a > b } -> boolean;
{ a <= b } -> boolean;
{ a >= b } -> boolean;
};
equality_comparable<T> && @\exposconcept{partially-ordered-with}@<T, T>;
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -978,7 +975,6 @@
\tcode{bool(a == b)} is \tcode{true}.
\item If \tcode{bool(a < b)} and \tcode{bool(b < c)}, then
\tcode{bool(a < c)}.
\item \tcode{bool(a > b) == bool(b < a)}.
\item \tcode{bool(a <= b) == !bool(b < a)}.
\item \tcode{bool(a >= b) == !bool(a < b)}.
\end{itemize}
Expand All @@ -989,23 +985,12 @@
template<class T, class U>
concept @\deflibconcept{totally_ordered_with}@ =
totally_ordered<T> && totally_ordered<U> &&
common_reference_with<const remove_reference_t<T>&, const remove_reference_t<U>&> &&
equality_comparable_with<T, U> &&
totally_ordered<
common_reference_t<
const remove_reference_t<T>&,
const remove_reference_t<U>&>> &&
equality_comparable_with<T, U> &&
requires(const remove_reference_t<T>& t,
const remove_reference_t<U>& u) {
{ t < u } -> boolean;
{ t > u } -> boolean;
{ t <= u } -> boolean;
{ t >= u } -> boolean;
{ u < t } -> boolean;
{ u > t } -> boolean;
{ u <= t } -> boolean;
{ u >= t } -> boolean;
};
@\exposconcept{partially-ordered-with}@<T, U>;
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -1045,7 +1030,7 @@
template<class T>
concept @\deflibconcept{copyable}@ = copy_constructible<T> && movable<T> && assignable_from<T&, const T&>;
template<class T>
concept @\deflibconcept{semiregular}@ = copyable<T> && default_constructible<T>;
concept @\deflibconcept{semiregular}@ = copyable<T> && default_initializable<T>;
template<class T>
concept @\deflibconcept{regular}@ = semiregular<T> && equality_comparable<T>;
\end{itemdecl}
Expand Down
100 changes: 30 additions & 70 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,8 @@

\indexheader{array}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{array}, class template \tcode{array}
Expand Down Expand Up @@ -3151,7 +3152,8 @@

\indexheader{deque}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{deque}, class template \tcode{deque}
Expand Down Expand Up @@ -3183,7 +3185,8 @@

\indexheader{forward_list}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{forwardlist}, class template \tcode{forward_list}
Expand Down Expand Up @@ -3215,7 +3218,8 @@

\indexheader{list}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{list}, class template \tcode{list}
Expand Down Expand Up @@ -3247,7 +3251,8 @@

\indexheader{vector}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{vector}, class template \tcode{vector}
Expand Down Expand Up @@ -6249,7 +6254,8 @@

\indexheader{map}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{map}, class template \tcode{map}
Expand Down Expand Up @@ -6310,7 +6316,8 @@

\indexheader{set}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{set}, class template \tcode{set}
Expand Down Expand Up @@ -7805,7 +7812,8 @@
\indexlibraryglobal{unordered_map}%
\indexlibraryglobal{unordered_multimap}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{unord.map}, class template \tcode{unordered_map}
Expand Down Expand Up @@ -7874,7 +7882,8 @@
\indexlibraryglobal{unordered_set}%
\indexlibraryglobal{unordered_multiset}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
// \ref{unord.set}, class template \tcode{unordered_set}
Expand Down Expand Up @@ -9587,7 +9596,8 @@

\indexheader{queue}
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
template<class T, class Container = deque<T>> class queue;
Expand Down Expand Up @@ -9629,7 +9639,8 @@

\indexheader{stack}%
\begin{codeblock}
#include <initializer_list>
#include <compare> // see \ref{compare.syn}
#include <initializer_list> // see \ref{initializer.list.syn}

namespace std {
template<class T, class Container = deque<T>> class stack;
Expand Down Expand Up @@ -10514,6 +10525,9 @@
template<class ElementType, size_t Extent = dynamic_extent>
class span;

template<class ElementType, size_t Extent>
inline constexpr bool ranges::enable_view<span<ElementType, Extent>> =
Extent == 0 || Extent == dynamic_extent;
template<class ElementType, size_t Extent>
inline constexpr bool ranges::enable_safe_range<span<ElementType, Extent>> = true;

Expand Down Expand Up @@ -10568,9 +10582,7 @@
using reference = element_type&;
using const_reference = const element_type&;
using iterator = @\impdefx{type of \tcode{span::iterator}}@; // see \ref{span.iterators}
using const_iterator = @\impdefx{type of \tcode{span::const_iterator}}@;
using reverse_iterator = std::reverse_iterator<iterator>;
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
static constexpr size_type extent = Extent;

// \ref{span.cons}, constructors, copy, and assignment
Expand Down Expand Up @@ -10622,12 +10634,8 @@
// \ref{span.iterators}, iterator support
constexpr iterator begin() const noexcept;
constexpr iterator end() const noexcept;
constexpr const_iterator cbegin() const noexcept;
constexpr const_iterator cend() const noexcept;
constexpr reverse_iterator rbegin() const noexcept;
constexpr reverse_iterator rend() const noexcept;
constexpr const_reverse_iterator crbegin() const noexcept;
constexpr const_reverse_iterator crend() const noexcept;

private:
pointer data_; // \expos
Expand Down Expand Up @@ -11119,23 +11127,21 @@
\rSec3[span.iterators]{Iterator support}

\indexlibrarymember{iterator}{span}%
\indexlibrarymember{const_iterator}{span}%
\begin{itemdecl}
using iterator = @\impdefx{type of \tcode{span::iterator}}@;
using const_iterator = @\impdefx{type of \tcode{span::const_iterator}}@;
\end{itemdecl}

\begin{itemdescr}
\pnum
The types
model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous},
meet the \oldconcept{RandomAccessIterator}
The type
models \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous},
meets the \oldconcept{RandomAccessIterator}
requirements\iref{random.access.iterators},
and
meet the requirements for
meets the requirements for
constexpr iterators\iref{iterator.requirements.general}.
All requirements on container iterators\iref{container.requirements} apply to
\tcode{span::iterator} and \tcode{span::const_iterator} as well.
\tcode{span::iterator} as well.
\end{itemdescr}

\indexlibrarymember{span}{begin}%
Expand Down Expand Up @@ -11184,52 +11190,6 @@
Equivalent to: \tcode{return reverse_iterator(begin());}
\end{itemdescr}

\indexlibrarymember{span}{cbegin}%
\begin{itemdecl}
constexpr const_iterator cbegin() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
A constant iterator referring to the first element in the span.
If \tcode{empty()} is \tcode{true}, then it returns the same value
as \tcode{cend()}.
\end{itemdescr}

\indexlibrarymember{span}{cend}%
\begin{itemdecl}
constexpr const_iterator cend() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
A constant iterator which is the past-the-end value.
\end{itemdescr}

\indexlibrarymember{span}{crbegin}%
\begin{itemdecl}
constexpr const_reverse_iterator crbegin() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return const_reverse_iterator(cend());}
\end{itemdescr}

\indexlibrarymember{span}{crend}%
\begin{itemdecl}
constexpr const_reverse_iterator crend() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return const_reverse_iterator(cbegin());}
\end{itemdescr}


\rSec3[span.objectrep]{Views of object representation}

Expand Down
Loading