std::sorted_unique_t, std::sorted_unique
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Containers library
(C++17)
(C++11)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++23)
(C++23)
(C++20)
(C++23)
Tables
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)
1) The type
std::sorted_unique_t
can be used in the function's (including constructor's) parameter list to match the intended tag.2) The corresponding
std::sorted_unique
instance of (1) is a disambiguation tag that can be passed to the functions of std::flat_map and std::flat_set to 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.[edit] Standard library
The following standard library container adaptors use (1,2) as disambiguation tags:
(C++23)
(class template) [edit]
(C++23)
(class template) [edit]