/
deprecated.tex
103 lines (86 loc) · 4.53 KB
/
deprecated.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
%!TEX root = N4382.tex
\normannex{depr}{Compatibility features}
\pnum
This Clause describes features of this document that are specified for compatibility with
existing implementations.
\pnum
These are deprecated features, where
\term{deprecated}
is defined as:
Normative for the current edition of the Ranges TS,
but having been identified as a candidate for removal from future revisions.
An implementation may declare library names and entities described in this section with the
\tcode{deprecated} attribute~(\cxxref{dcl.attr.deprecated}).
\rSec1[depr.rvalue.ranges]{Rvalue range access}
\pnum
Use of the range access customization point objects
\tcode{begin}, \tcode{end},
\tcode{cbegin}, \tcode{cend},
\tcode{rbegin}, \tcode{rend},
\tcode{crbegin}, \tcode{crend},
\tcode{data}, and \tcode{cdata}
with rvalue arguments is deprecated. In a future revision of this document,
such usage could become ill-formed.
\rSec1[depr.algo.range-and-a-half]{Range-and-a-half algorithms}
\pnum
The following algorithm signatures are deemed unsafe and are deprecated in this document.
\begin{codeblock}
template <InputIterator I1, Sentinel<I1> S1, InputIterator I2,
class Proj1 = identity, class Proj2 = identity,
IndirectPredicate<projected<I1, Proj1>, projected<I2, Proj2>> Pred = equal_to<>>
tagged_pair<tag::in1(I1), tag::in2(I2)>
mismatch(I1 first1, S1 last1, I2 first2, Pred pred = Pred{},
Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
template <InputRange Rng1, InputIterator I2,
class Proj1 = identity, class Proj2 = identity,
IndirectPredicate<projected<iterator_t<Rng1>, Proj1>,
projected<I2, Proj2>> Pred = equal_to<>>
tagged_pair<tag::in1(safe_iterator_t<Rng1>), tag::in2(I2)>
mismatch(Rng1&& rng1, I2 first2, Pred pred = Pred{},
Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
template <InputIterator I1, Sentinel<I1> S1, InputIterator I2,
class Pred = equal_to<>, class Proj1 = identity, class Proj2 = identity>
requires IndirectlyComparable<I1, I2, Pred, Proj1, Proj2>()
bool equal(I1 first1, S1 last1,
I2 first2, Pred pred = Pred{},
Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
template <InputRange Rng1, InputIterator I2, class Pred = equal_to<>,
class Proj1 = identity, class Proj2 = identity>
requires IndirectlyComparable<iterator_t<Rng1>, I2, Pred, Proj1, Proj2>()
bool equal(Rng1&& rng1, I2 first2, Pred pred = Pred{},
Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
template <ForwardIterator I1, Sentinel<I1> S1, ForwardIterator I2,
class Pred = equal_to<>, class Proj1 = identity, class Proj2 = identity>
requires IndirectlyComparable<I1, I2, Pred, Proj1, Proj2>()
bool is_permutation(I1 first1, S1 last1, I2 first2,
Pred pred = Pred{},
Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
template <ForwardRange Rng1, ForwardIterator I2, class Pred = equal_to<>,
class Proj1 = identity, class Proj2 = identity>
requires IndirectlyComparable<iterator_t<Rng1>, I2, Pred, Proj1, Proj2>()
bool is_permutation(Rng1&& rng1, I2 first2, Pred pred = Pred{},
Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
template <ForwardIterator I1, Sentinel<I1> S1, ForwardIterator I2>
requires IndirectlySwappable<I1, I2>()
tagged_pair<tag::in1(I1), tag::in2(I2)>
swap_ranges(I1 first1, S1 last1, I2 first2);
template <ForwardRange Rng, ForwardIterator I>
requires IndirectlySwappable<iterator_t<Rng>, I>()
tagged_pair<tag::in1(safe_iterator_t<Rng>), tag::in2(I)>
swap_ranges(Rng&& rng1, I first2);
template <InputIterator I1, Sentinel<I1> S1, InputIterator I2, WeaklyIncrementable O,
class F, class Proj1 = identity, class Proj2 = identity>
requires Writable<O, indirect_result_of_t<F&(projected<I1, Proj1>, projected<I2, Proj2>)>>()
tagged_tuple<tag::in1(I1), tag::in2(I2), tag::out(O)>
transform(I1 first1, S1 last1, I2 first2, O result,
F binary_op, Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
template <InputRange Rng, InputIterator I, WeaklyIncrementable O, class F,
class Proj1 = identity, class Proj2 = identity>
requires Writable<O, indirect_result_of_t<F&(
projected<iterator_t<Rng>, Proj1>, projected<I, Proj2>>)>()
tagged_tuple<tag::in1(safe_iterator_t<Rng>), tag::in2(I), tag::out(O)>
transform(Rng&& rng1, I first2, O result,
F binary_op, Proj1 proj1 = Proj1{}, Proj2 proj2 = Proj2{});
\end{codeblock}
\remark These signatures behave as described in Clause~\ref{algorithms} with the name
\tcode{last2} defined as \tcode{first2 + (last1 - first1)}.