This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Open status.
Section: 24.7.4 [alg.partitions] Status: Open Submitter: Jonathan Wakely Opened: 2016-07-06 Last modified: 2017-07-16
View all other issues in [alg.partitions].
View all issues with Open status.
Requires: InputIterator's value type shall be convertible to Predicate's argument type.
This seems to date from the days of adaptable function objects with an argument_type typedef, but in modern C++ the predicate might not have an argument type. It could have a function template that accepts various arguments, so it doesn't make sense to state requirements in terms of a type that isn't well defined.
[2016-07, Toronto Saturday afternoon issues processing]
The proposed resolution needs to be updated because the underlying wording has changed. Also, since the sequence is homogeneous, we shouldn't have to say that the expression is well-formed for all elements in the range; that implies that it need not be well-formed if the range is empty.
Marshall and JW to reword. Status to Open
This wording is relative to N4594.
Edit 24.7.4 [alg.partitions] as indicated:
template <class InputIterator, class Predicate> bool is_partitioned(InputIterator first, InputIterator last, Predicate pred);
InputIterator's value type shall be convertible to Predicate's argument type.template <class InputIterator, class OutputIterator1, class OutputIterator2, class Predicate> pair<OutputIterator1, OutputIterator2> partition_copy(InputIterator first, InputIterator last, OutputIterator1 out_true, OutputIterator2 out_false, Predicate pred);
-12- Requires: InputIterator's value type shall be CopyAssignable, and shall be writable (22.3.1 [iterator.requirements.general]) to the out_true and out_false OutputIterators, and[…]
shall be convertible to Predicate's argument type. The input range shall not overlap with either of the output ranges.template<class ForwardIterator, class Predicate> ForwardIterator partition_point(ForwardIterator first, ForwardIterator last, Predicate pred);
ForwardIterator's value type shall be convertible to Predicate's argument type. [first, last) shall be partitioned by pred, i.e. all elements that satisfy pred shall appear before those that do not.