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

[2022-07 LWG Motion 1] P2618R0 C++ Standard Library Issues #5667

Merged
merged 26 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0472487
LWG3564 transform_view::iterator<true>::value_type and iterator_categ…
burblebee Jul 28, 2022
c5b6a5c
LWG3617 function/packaged_task deduction guides and deducing this
burblebee Jul 28, 2022
53c83cf
LWG3656 Inconsistent bit operations returning a count
burblebee Jul 28, 2022
c61c1b6
LWG3659 Consider ATOMIC_FLAG_INIT undeprecation
burblebee Jul 28, 2022
6fbded2
LWG3670 Cpp17InputIterators don't have integer-class difference types
burblebee Jul 28, 2022
50f1e24
LWG3671 atomic_fetch_xor missing from stdatomic.h
burblebee Jul 28, 2022
0df9a20
LWG3672 common_iterator::operator->() should return by value
burblebee Jul 28, 2022
da4456d
LWG3683 operator== for polymorphic_allocator cannot deduce template a…
burblebee Jul 28, 2022
29f66da
LWG3687 expected<cv void, E> move constructor should move
burblebee Jul 28, 2022
76a86b8
LWG3692 zip_view::iterator's operator<=> is overconstrained
burblebee Jul 28, 2022
62e3587
LWG3701 Make formatter<remove_cvref_t<const charT[N]>, charT> require…
burblebee Jul 28, 2022
d29b963
LWG3702 Should zip_transform_view::iterator remove operator<?
burblebee Jul 28, 2022
62fe2a0
LWG3703 Missing requirements for expected<T, E> requires is_void<T>
burblebee Jul 28, 2022
a7cbca7
LWG3704 LWG 2059 added overloads that might be ill-formed for sets
burblebee Jul 28, 2022
f8f6265
LWG3705 Hashability shouldn't depend on basic_string's allocator
burblebee Jul 28, 2022
7ecb746
LWG3707 chunk_view::outer-iterator::value_type::size should return un…
burblebee Jul 28, 2022
d6a68e3
LWG3708 take_while_view::sentinel's conversion constructor should move
burblebee Jul 28, 2022
60fa43a
LWG3709 LWG-3703 was underly ambitious
burblebee Jul 28, 2022
d7a01d9
LWG3710 The end of chunk_view for input ranges can be const
burblebee Jul 28, 2022
0416e7e
LWG3711 Missing preconditions for slide_view constructor
burblebee Jul 28, 2022
ab54e00
LWG3712 chunk_view and slide_view should not be default_initializable
burblebee Jul 28, 2022
d6d435a
LWG3713 Sorted with respect to comparator (only)
burblebee Jul 28, 2022
81b066e
LWG3715 view_interface::empty is overconstrained
burblebee Jul 28, 2022
8d06220
LWG3719 Directory iterators should be usable with default sentinel
burblebee Jul 28, 2022
c519b70
LWG3721 Allow an arg-id with a value of zero for width in std-format-…
burblebee Jul 28, 2022
cdd04d6
LWG3724 decay-copy should be constrained
burblebee Jul 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6206,6 +6206,7 @@
\end{note}

\pnum
\indexdefn{sequence!sorted!with respect to a comparator and projection}%
A sequence is \term{sorted with respect to a \tcode{comp} and \tcode{proj}}
for a comparator and projection \tcode{comp} and \tcode{proj}
if for every iterator \tcode{i} pointing to the sequence and
Expand All @@ -6217,6 +6218,13 @@
\end{codeblock}
is \tcode{false}.

\pnum
\indexdefn{sequence!sorted!with respect to a comparator}%
A sequence is \term{sorted with respect to a comparator} \tcode{comp}
for a comparator \tcode{comp}
if it is sorted with respect to
\tcode{comp} and \tcode{identity\{\}} (the identity projection).

\pnum
A sequence \range{start}{finish} is
\term{partitioned with respect to an expression} \tcode{f(e)}
Expand Down
12 changes: 8 additions & 4 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10515,7 +10515,8 @@
insert_return_type insert(node_type&& nh);
iterator insert(const_iterator hint, node_type&& nh);

iterator erase(iterator position);
iterator erase(iterator position)
requires (!@\libconcept{same_as}@<iterator, const_iterator>);
iterator erase(const_iterator position);
size_type erase(const key_type& x);
template<class K> size_type erase(K&& x);
Expand Down Expand Up @@ -10827,7 +10828,8 @@
iterator insert(node_type&& nh);
iterator insert(const_iterator hint, node_type&& nh);

iterator erase(iterator position);
iterator erase(iterator position)
requires (!@\libconcept{same_as}@<iterator, const_iterator>);
iterator erase(const_iterator position);
size_type erase(const key_type& x);
template<class K> size_type erase(K&& x);
Expand Down Expand Up @@ -12359,7 +12361,8 @@
insert_return_type insert(node_type&& nh);
iterator insert(const_iterator hint, node_type&& nh);

iterator erase(iterator position);
iterator erase(iterator position)
requires (!@\libconcept{same_as}@<iterator, const_iterator>);
iterator erase(const_iterator position);
size_type erase(const key_type& k);
template<class K> size_type erase(K&& x);
Expand Down Expand Up @@ -12732,7 +12735,8 @@
iterator insert(node_type&& nh);
iterator insert(const_iterator hint, node_type&& nh);

iterator erase(iterator position);
iterator erase(iterator position)
requires (!@\libconcept{same_as}@<iterator, const_iterator>);
iterator erase(const_iterator position);
size_type erase(const key_type& k);
template<class K> size_type erase(K&& x);
Expand Down
24 changes: 0 additions & 24 deletions source/future.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2639,8 +2639,6 @@
void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;

#define ATOMIC_VAR_INIT(value) @\seebelow@

#define ATOMIC_FLAG_INIT @\seebelow@
}
\end{codeblock}

Expand Down Expand Up @@ -2709,25 +2707,3 @@
\end{codeblock}
\end{example}
\end{itemdescr}

\rSec2[depr.atomics.flag]{Flag type and operations}

\indexlibraryglobal{ATOMIC_FLAG_INIT}%
\begin{itemdecl}
#define ATOMIC_FLAG_INIT @\seebelow@
\end{itemdecl}

\begin{itemdescr}
\pnum
\remarks
The macro \tcode{ATOMIC_FLAG_INIT} is defined in such a way that
it can be used to initialize an object of type \tcode{atomic_flag}
to the clear state.
The macro can be used in the form:
\begin{codeblock}
atomic_flag guard = ATOMIC_FLAG_INIT;
\end{codeblock}
It is unspecified whether the macro can be used
in other initialization contexts.
For a complete static-duration object, that initialization shall be static.
\end{itemdescr}
8 changes: 8 additions & 0 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15757,6 +15757,10 @@
directory_iterator& operator++();
directory_iterator& increment(error_code& ec);

bool operator==(default_sentinel_t) const noexcept {
return *this == directory_iterator();
}

// other members as required by \ref{input.iterators}, input iterators
};
}
Expand Down Expand Up @@ -16003,6 +16007,10 @@
void pop(error_code& ec);
void disable_recursion_pending();

bool operator==(default_sentinel_t) const noexcept {
return *this == recursive_directory_iterator();
}

// other members as required by \ref{input.iterators}, input iterators
};
}
Expand Down
4 changes: 2 additions & 2 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4796,7 +4796,7 @@
constexpr decltype(auto) operator*();
constexpr decltype(auto) operator*() const
requires @\exposconcept{dereferenceable}@<const I>;
constexpr decltype(auto) operator->() const
constexpr auto operator->() const
requires @\seebelow@;

constexpr common_iterator& operator++();
Expand Down Expand Up @@ -4964,7 +4964,7 @@

\indexlibrarymember{operator->}{common_iterator}%
\begin{itemdecl}
constexpr decltype(auto) operator->() const
constexpr auto operator->() const
requires @\seebelow@;
\end{itemdecl}

Expand Down
8 changes: 5 additions & 3 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,11 @@
\indexlibrary{decay-copy@\tcode{\placeholder{decay-copy}}}%
\begin{codeblock}
namespace std {
template<class T> constexpr decay_t<T> @\placeholdernc{decay-copy}@(T&& v)
noexcept(is_nothrow_convertible_v<T, decay_t<T>>) // \expos
{ return std::forward<T>(v); }
template<class T>
requires @\libconcept{convertible_to}@<T, decay_t<T>>
constexpr decay_t<T> @\placeholdernc{decay-copy}@(T&& v)
noexcept(is_nothrow_convertible_v<T, decay_t<T>>) // \expos
{ return std::forward<T>(v); }

constexpr auto @\placeholdernc{synth-three-way}@ =
[]<class T, class U>(const T& t, const U& u)
Expand Down
6 changes: 6 additions & 0 deletions source/memory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5442,6 +5442,12 @@
polymorphic_allocator select_on_container_copy_construction() const;

memory_resource* resource() const;

// friends
friend bool operator==(const polymorphic_allocator& a,
const polymorphic_allocator& b) noexcept {
return *a.resource() == *b.resource();
}
};
}
\end{codeblock}
Expand Down