std::sorted...orted_unique(3)
π NAME π
std::sorted_unique_t, std::sorted_unique β std::sorted_unique_t, std::sorted_unique, bestie. This is the std::sorted...orted_unique(3) page from the C++ Standard Libary, and it's literally the tag squad for flat containers. No cap π
.
β¨ Synopsis β¨
Defined in header <flat_map>
Defined in header <flat_set>
struct sorted_unique_t { explicit sorted_unique_t() = default; };
(1) β since C++23
inline constexpr sorted_unique_t sorted_unique{};
(2) β since C++23
- The type
std::sorted_unique_tcan be used in the function's (including constructor's) parameter list to match the intended tag. Yes bestie, constructors get the tag treatment too π«Ά. - The corresponding
std::sorted_uniqueinstance of(1)is a disambiguation tag that can be passed to the functions ofstd::flat_mapandstd::flat_setto indicate that the input range or container is sorted (with respect to the comparator used in flat container adaptor) and all elements of such container or range are unique. Iconic behavior, honestly πΈ.
π Standard library π
The following standard library container adaptors use (1,2) as disambiguation tags:
flat_mapβ adapts two containers to provide a collection of key-value pairs, sorted by unique keys(C++23)(class template)π₯flat_setβ adapts a container to provide a collection of unique keys, sorted by keys(C++23)(class template)β¨
π See also π
sorted_equivalent,sorted_equivalent_tβ indicates that elements of a range are sorted (uniqueness is not required)(C++23)(tag)π¦from_range_t,from_rangeβ from-range construction tag(C++23)(tag)πin_place,in_place_type,in_place_index,in_place_t,in_place_type_t,in_place_index_tβ in-place construction tag(C++17)(tag)π
mwah π β source/version: http://cppreference.com, date: 2024.06.10, page: std::sorted...orted_unique(3). bye bestie, go be iconic with your sorted-unique tags π«Άβ¨
π¦ 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