std::sorted...d_equivalent(3)
π NAME π
std::sorted_equivalent_t,std::sorted_equivalent β std::sorted_equivalent_t,std::sorted_equivalent
Okay bestie, real talk: this page is from the C++ Standard Libary manual (yes, thatβs how the header spells it, not me π
), section 3. Itβs all about these two little tag cuties.
β¨ Synopsis β¨
Both of these are defined in the headers below, and theyβre giving βtag disambiguationβ main character energy since C++23:
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)
- The type
std::sorted_equivalent_tcan be used in the functionβs (including constructorβs) parameter list to match the intended tag. π«Ά - The corresponding
std::sorted_equivalentinstance of(1)is a disambiguation tag that can be passed to the functions ofstd::flat_multimapandstd::flat_multisetto 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. No cap, it literally just says βsorted is fine, duplicates are fine too.β π
π Standard library π
The following standard library container adaptors use (1,2) as disambiguation tags:
flat_multimapβ adapts two containers to provide a collection of key-value pairs,(C++23)sorted by keys;(class template)π₯flat_multisetβ adapts a container to provide a collection of keys, sorted by keys,(C++23);(class template)β¨
π¦ See also π¦
sorted_uniqueβ indicates that elements of a range are sorted and unique πΈsorted_unique_tβ(tag)(C++23)from_range_tβ from-range construction tag πfrom_rangeβ(tag)(C++23)in_place,in_place_type,in_place_indexβ in-place construction tag πin_place_t,in_place_type_t,in_place_index_tβ(tag)(C++17)
okay thatβs the whole page, mwah π β source/version is http://cppreference.com, dated 2024.06.10, and the footer label is std::sorted...d_equivalent(3). slay. π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms