|
945 | 945 | but specialized allocators can choose a different definition.
|
946 | 946 | \end{note}
|
947 | 947 |
|
| 948 | +\pnum |
948 | 949 | The following exposition-only concept is used in the definition of containers:
|
949 | 950 | \begin{codeblock}
|
950 | 951 | template<class R, class T>
|
|
1719 | 1720 | \tcode{\libconcept{assignable_from}<T\&, ranges::range_reference_t<R>>}
|
1720 | 1721 | is modeled.
|
1721 | 1722 |
|
| 1723 | +\pnum |
1722 | 1724 | \expects
|
1723 | 1725 | \tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{X}
|
1724 | 1726 | from \tcode{*ranges::begin(rg)}.
|
|
1990 | 1992 | \pnum
|
1991 | 1993 | \expects
|
1992 | 1994 | \tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{X}
|
1993 |
| -from \tcode{ranges::begin(rg)}. |
| 1995 | +from \tcode{*ranges::begin(rg)}. |
1994 | 1996 |
|
1995 | 1997 | \pnum
|
1996 | 1998 | \effects
|
|
2072 | 2074 | \pnum
|
2073 | 2075 | \expects
|
2074 | 2076 | \tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{X}
|
2075 |
| -from \tcode{ranges::begin(rg)}. |
| 2077 | +from \tcode{*ranges::begin(rg)}. |
| 2078 | +For \tcode{vector}, |
| 2079 | +\tcode{T} is also |
| 2080 | +\oldconcept{MoveInsertable} into \tcode{X}. |
2076 | 2081 |
|
2077 | 2082 | \pnum
|
2078 | 2083 | \effects
|
|
2620 | 2625 | \range{i}{j} denotes a valid range,
|
2621 | 2626 | \item
|
2622 | 2627 | \tcode{rg} denotes a value of a type \tcode{R}
|
2623 |
| -that models \exposconcept{container-compatible-range<value_type>}, |
| 2628 | +that models \tcode{\exposconcept{container-compatible-range}<value_type>}, |
2624 | 2629 | \item
|
2625 | 2630 | \tcode{p} denotes a valid constant iterator to \tcode{a},
|
2626 | 2631 | \item
|
|
2925 | 2930 |
|
2926 | 2931 | \pnum
|
2927 | 2932 | \complexity
|
2928 |
| -same as \tcode{X(from_range, rg, c)} |
| 2933 | +Same as \tcode{X(from_range, rg, c)}. |
2929 | 2934 | \end{itemdescr}
|
2930 | 2935 |
|
2931 | 2936 | \indexlibraryctor{set}%
|
|
6642 | 6647 |
|
6643 | 6648 | \indexlibraryctor{deque}%
|
6644 | 6649 | \begin{itemdecl}
|
6645 |
| -template<@\libconcept{container-compatible-range}@<T> R> |
| 6650 | +template<@\exposconcept{container-compatible-range}@<T> R> |
6646 | 6651 | deque(from_range_t, R&& rg, const Allocator& = Allocator());
|
6647 | 6652 | \end{itemdecl}
|
6648 | 6653 |
|
|
7112 | 7117 | \indexlibraryctor{forward_list}%
|
7113 | 7118 | \begin{itemdecl}
|
7114 | 7119 | template<@\exposconcept{container-compatible-range}@<T> R>
|
7115 |
| -forward_list(from_range_t, R&& rg, const Allocator& = Allocator()); |
| 7120 | + forward_list(from_range_t, R&& rg, const Allocator& = Allocator()); |
7116 | 7121 | \end{itemdecl}
|
7117 | 7122 |
|
7118 | 7123 | \begin{itemdescr}
|
|
7301 | 7306 | \pnum
|
7302 | 7307 | \expects
|
7303 | 7308 | \tcode{position} is \tcode{before_begin()} or
|
7304 |
| -is a dereferenceable iterator in the range [begin(), end()). |
| 7309 | +is a dereferenceable iterator in the range \range{begin()}{end()}. |
7305 | 7310 | \tcode{rg} and \tcode{*this} do not overlap.
|
7306 | 7311 |
|
7307 | 7312 | \pnum
|
|
8008 | 8013 | \begin{itemdescr}
|
8009 | 8014 | \pnum
|
8010 | 8015 | \effects
|
8011 |
| -Constructs a list object with the elements of the range \tcode{rg}. |
| 8016 | +Constructs a \tcode{list} object with the elements of the range \tcode{rg}. |
8012 | 8017 |
|
8013 | 8018 | \pnum
|
8014 | 8019 | \complexity
|
|
8505 | 8510 | and, for an element type other than \tcode{bool},
|
8506 | 8511 | of a contiguous container\iref{container.requirements.general}.
|
8507 | 8512 | The exceptions are the
|
8508 |
| -\tcode{push_front}, \tcode{pop_front}, and \tcode{emplace_front} member functions, which are not |
| 8513 | +\tcode{push_front}, \tcode{prepend_range}, \tcode{pop_front}, and \tcode{emplace_front} member functions, which are not |
8509 | 8514 | provided. Descriptions are provided here only for operations on \tcode{vector}
|
8510 | 8515 | that are not described in one of these tables or for operations where there is
|
8511 | 8516 | additional semantic information.
|
|
8756 | 8761 | from the results of dereferencing successive iterators of \tcode{rg},
|
8757 | 8762 | where $N$ is \tcode{ranges::distance(rg)}.
|
8758 | 8763 | Performs no reallocations if \tcode{R} models
|
8759 |
| -ranges::\libconcept{forward_range} or ranges::\libconcept{sized_range}; |
| 8764 | +\tcode{ranges::\libconcept{forward_range}} or \tcode{ranges::\libconcept{sized_range}}; |
8760 | 8765 | otherwise, performs order $\log N$ reallocations and
|
8761 | 8766 | order $N$ calls to the copy or move constructor of \tcode{T}.
|
8762 | 8767 | \end{itemdescr}
|
|
10090 | 10095 | multimap(InputIterator first, InputIterator last,
|
10091 | 10096 | const Compare& comp = Compare(),
|
10092 | 10097 | const Allocator& = Allocator());
|
10093 |
| - template<@\exposid{container-compatible-range}@<value_type> R> |
| 10098 | + template<@\exposconcept{container-compatible-range}@<value_type> R> |
10094 | 10099 | multimap(from_range_t, R&& rg,
|
10095 | 10100 | const Compare& comp = Compare(), const Allocator& = Allocator());
|
10096 | 10101 | multimap(const multimap& x);
|
@@ -10627,14 +10632,14 @@
|
10627 | 10632 |
|
10628 | 10633 | \indexlibraryctor{set}%
|
10629 | 10634 | \begin{itemdecl}
|
10630 |
| -template<@\exposid{container-compatible-range}@<value_type> R> |
| 10635 | +template<@\exposconcept{container-compatible-range}@<value_type> R> |
10631 | 10636 | set(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
|
10632 | 10637 | \end{itemdecl}
|
10633 | 10638 |
|
10634 | 10639 | \begin{itemdescr}
|
10635 | 10640 | \pnum
|
10636 | 10641 | \effects
|
10637 |
| -Constructs an empty set using the specified comparison object and allocator, |
| 10642 | +Constructs an empty \tcode{set} using the specified comparison object and allocator, |
10638 | 10643 | and inserts elements from the range \tcode{rg}.
|
10639 | 10644 |
|
10640 | 10645 | \pnum
|
|
10743 | 10748 | template<class InputIterator>
|
10744 | 10749 | multiset(InputIterator first, InputIterator last,
|
10745 | 10750 | const Compare& comp = Compare(), const Allocator& = Allocator());
|
10746 |
| - template<@\exposid{container-compatible-range}@<value_type> R> |
| 10751 | + template<@\exposconcept{container-compatible-range}@<value_type> R> |
10747 | 10752 | multiset(from_range_t, R&& rg,
|
10748 | 10753 | const Compare& comp = Compare(), const Allocator& = Allocator());
|
10749 | 10754 | multiset(const multiset& x);
|
|
10799 | 10804 | iterator insert(const_iterator position, value_type&& x);
|
10800 | 10805 | template<class InputIterator>
|
10801 | 10806 | void insert(InputIterator first, InputIterator last);
|
10802 |
| - template<@\exposid{container-compatible-range}@<value_type> R> |
| 10807 | + template<@\exposconcept{container-compatible-range}@<value_type> R> |
10803 | 10808 | void insert_range(R&& rg);
|
10804 | 10809 | void insert(initializer_list<value_type>);
|
10805 | 10810 |
|
@@ -11232,10 +11237,10 @@
|
11232 | 11237 | unordered_map(InputIterator f, InputIterator l, size_type n, const hasher& hf,
|
11233 | 11238 | const allocator_type& a)
|
11234 | 11239 | : unordered_map(f, l, n, hf, key_equal(), a) { }
|
11235 |
| - template<@\libconcept{container-compatible-range}@<value_type> R> |
| 11240 | + template<@\exposconcept{container-compatible-range}@<value_type> R> |
11236 | 11241 | unordered_map(from_range_t, R&& rg, size_type n, const allocator_type& a)
|
11237 | 11242 | : unordered_map(from_range, std::forward<R>(rg), n, hasher(), key_equal(), a) { }
|
11238 |
| - template<@\libconcept{container-compatible-range}@<value_type> R> |
| 11243 | + template<@\exposconcept{container-compatible-range}@<value_type> R> |
11239 | 11244 | unordered_map(from_range_t, R&& rg, size_type n, const hasher& hf, const allocator_type& a)
|
11240 | 11245 | : unordered_map(from_range, std::forward<R>(rg), n, hf, key_equal(), a) { }
|
11241 | 11246 | unordered_map(initializer_list<value_type> il, size_type n, const allocator_type& a)
|
|
11275 | 11280 | iterator insert(const_iterator hint, value_type&& obj);
|
11276 | 11281 | template<class P> iterator insert(const_iterator hint, P&& obj);
|
11277 | 11282 | template<class InputIterator> void insert(InputIterator first, InputIterator last);
|
11278 |
| - template<@\libconcept{container-compatible-range}@<value_type> R> |
| 11283 | + template<@\exposconcept{container-compatible-range}@<value_type> R> |
11279 | 11284 | void insert_range(R&& rg);
|
11280 | 11285 | void insert(initializer_list<value_type>);
|
11281 | 11286 |
|
|
11414 | 11419 | equal_to<@\placeholder{iter-key-type}@<InputIterator>>, Allocator>;
|
11415 | 11420 |
|
11416 | 11421 | template<ranges::\tcode{input_range} R, class Allocator>
|
11417 |
| - unordered_map(from_range_t, R&&, typename see below::size_type, Allocator) |
| 11422 | + unordered_map(from_range_t, R&&, typename @\seebelow@::size_type, Allocator) |
11418 | 11423 | -> unordered_map<@\exposid{range-key-type}@<R>, @\exposid{range-mapped-type}@<R>, hash<@\exposid{range-key-type}@<R>>,
|
11419 | 11424 | equal_to<@\exposid{range-key-type}@<R>>, Allocator>;
|
11420 | 11425 |
|
|
12413 | 12418 | -> unordered_set<@\placeholder{iter-value-type}@<InputIterator>,
|
12414 | 12419 | Hash, Pred, Allocator>;
|
12415 | 12420 |
|
12416 |
| - template<ranges::input_range R, |
| 12421 | + template<ranges::@\libconcept{input_range}@ R, |
12417 | 12422 | class Hash = hash<ranges::range_value_t<R>>,
|
12418 | 12423 | class Pred = equal_to<ranges::range_value_t<R>>,
|
12419 | 12424 | class Allocator = allocator<ranges::range_value_t<R>>>
|
|
12633 | 12638 | const hasher& hf = hasher(),
|
12634 | 12639 | const key_equal& eql = key_equal(),
|
12635 | 12640 | const allocator_type& a = allocator_type());
|
12636 |
| - template<container-compatible-range<value_type> R> |
| 12641 | + template<@\exposconcept{container-compatible-range}@<value_type> R> |
12637 | 12642 | unordered_multiset(from_range_t, R&& rg,
|
12638 | 12643 | size_type n = @\seebelow@,
|
12639 | 12644 | const hasher& hf = hasher(),
|
|
12786 | 12791 | -> unordered_multiset<@\placeholder{iter-value-type}@<InputIterator>,
|
12787 | 12792 | Hash, Pred, Allocator>;
|
12788 | 12793 |
|
12789 |
| - template<ranges::input_range R, |
| 12794 | + template<ranges::@\libconcept{input_range}@ R, |
12790 | 12795 | class Hash = hash<ranges::range_value_t<R>>,
|
12791 | 12796 | class Pred = equal_to<ranges::range_value_t<R>>,
|
12792 | 12797 | class Allocator = allocator<ranges::range_value_t<R>>>
|
|
12824 | 12829 | -> unordered_multiset<ranges::range_value_t<R>, hash<ranges::range_value_t<R>>,
|
12825 | 12830 | equal_to<ranges::range_value_t<R>>, Allocator>;
|
12826 | 12831 |
|
12827 |
| - template<ranges::input_range R, class Hash, class Allocator> |
| 12832 | + template<ranges::@\libconcept{input_range}@ R, class Hash, class Allocator> |
12828 | 12833 | unordered_multiset(from_range_t, R&&, typename @\seebelow@::size_type, Hash, Allocator)
|
12829 | 12834 | -> unordered_multiset<ranges::range_value_t<R>, Hash, equal_to<ranges::range_value_t<R>>,
|
12830 | 12835 | Allocator>;
|
|
13102 | 13107 | queue(InputIterator first, InputIterator last, const Alloc&);
|
13103 | 13108 | template<@\exposconcept{container-compatible-range}@<T> R, class Alloc>
|
13104 | 13109 | queue(from_range_t, R&& rg, const Alloc&);
|
| 13110 | + |
13105 | 13111 | [[nodiscard]] bool empty() const { return c.empty(); }
|
13106 | 13112 | size_type size() const { return c.size(); }
|
13107 | 13113 | reference front() { return c.front(); }
|
|
13301 | 13307 | \effects
|
13302 | 13308 | Equivalent to \tcode{c.append_range(std::forward<R>(rg))}
|
13303 | 13309 | if that is a valid expression,
|
13304 |
| -otherwise \tcode{ranges::copy(rg, back_inserter(c));} |
| 13310 | +otherwise \tcode{ranges::copy(rg, back_inserter(c))}. |
13305 | 13311 | \end{itemdescr}
|
13306 | 13312 |
|
13307 | 13313 | \rSec3[queue.ops]{Operators}
|
|
13803 | 13809 |
|
13804 | 13810 | \indexlibraryctor{priority_queue}%
|
13805 | 13811 | \begin{itemdecl}
|
13806 |
| -template<container-compatible-range<T> R, class Alloc> |
| 13812 | +template<@\exposconcept{container-compatible-range}@<T> R, class Alloc> |
13807 | 13813 | priority_queue(from_range_t, R&& rg, const Alloc& a);
|
13808 | 13814 | \end{itemdecl}
|
13809 | 13815 |
|
|
14164 | 14170 | \effects
|
14165 | 14171 | Equivalent to \tcode{c.append_range(std::forward<R>(rg))}
|
14166 | 14172 | if that is a valid expression,
|
14167 |
| -otherwise \tcode{ranges::copy(rg, back_inserter(c));} |
| 14173 | +otherwise \tcode{ranges::copy(rg, back_inserter(c))}. |
14168 | 14174 | \end{itemdescr}
|
14169 | 14175 |
|
14170 | 14176 | \rSec3[stack.ops]{Operators}
|
|
0 commit comments