Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/container/sorted equivalent"

From cppreference.com
< cpp‎ | container
m (See also: ++)
m (See also: reorder)
 
Line 25: Line 25:
 
===See also===
 
===See also===
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc|cpp/utility/dsc in_place}}
 
 
{{dsc inc|cpp/container/dsc sorted_unique}}
 
{{dsc inc|cpp/container/dsc sorted_unique}}
 
{{dsc inc|cpp/ranges/dsc from_range}}
 
{{dsc inc|cpp/ranges/dsc from_range}}
 +
{{dsc inc|cpp/utility/dsc in_place}}
 
{{dsc end}}
 
{{dsc end}}
  
 
{{langlinks|de|es|ja|ru|zh}}
 
{{langlinks|de|es|ja|ru|zh}}

Latest revision as of 18:10, 14 May 2024

Defined in header <flat_map>
Defined in header <flat_set>
struct sorted_equivalent_t { explicit sorted_equivalent_t() = default; };
(1) (since C++23)
inline constexpr sorted_equivalent_t sorted_equivalent{};
(2) (since C++23)
1) The type std::sorted_equivalent_t can be used in the function's (including constructor's) parameter list to match the intended tag.
2) The corresponding std::sorted_equivalent instance of (1) is a disambiguation tag that can be passed to the functions of std::flat_multimap and std::flat_multiset to indicate that the input range or container is sorted (with respect to the comparator used in flat container adaptor), whilst uniqueness of elements is not required.

[edit] Standard library

The following standard library container adaptors use (1,2) as disambiguation tags:

adapts two containers to provide a collection of key-value pairs, sorted by keys
(class template) [edit]
adapts a container to provide a collection of keys, sorted by keys
(class template) [edit]

[edit] See also

indicates that elements of a range are sorted and unique
(tag)[edit]
from-range construction tag
(tag)[edit]
in-place construction tag
(tag)[edit]