template<classKeyContainer,classMappedContainer,classCompare=std::less<typenameKeyContainer::value_type>>flat_map(KeyContainer,MappedContainer,Compare=Compare())->flat_map<typenameKeyContainer::value_type,typenameMappedContainer::value_type,Compare,KeyContainer,MappedContainer>; (1) (since C++23)template<classKeyContainer,classMappedContainer,classAllocator>flat_map(KeyContainer,MappedContainer,Allocator)->flat_map<typenameKeyContainer::value_type,typenameMappedContainer::value_type,std::less<typenameKeyContainer::value_type>,KeyContainer,MappedContainer>; (2) (since C++23)template<classKeyContainer,classMappedContainer,classCompare,classAllocator>flat_map(KeyContainer,MappedContainer,Compare,Allocator)->flat_map<typenameKeyContainer::value_type,typenameMappedContainer::value_type,Compare,KeyContainer,MappedContainer>; (3) (since C++23)template<classKeyContainer,classMappedContainer,classCompare=std::less<typenameKeyContainer::value_type>>flat_map(std::sorted_unique_t,KeyContainer,MappedContainer,Compare=Compare())->flat_map<typenameKeyContainer::value_type,typenameMappedContainer::value_type,Compare,KeyContainer,MappedContainer>; (4) (since C++23)template<classKeyContainer,classMappedContainer,classAllocator>flat_map(std::sorted_unique_t,KeyContainer,MappedContainer,Allocator)->flat_map<typenameKeyContainer::value_type,typenameMappedContainer::value_type,std::less<typenameKeyContainer::value_type>,KeyContainer,MappedContainer>; (5) (since C++23)template<classKeyContainer,classMappedContainer,classCompare,classAllocator>flat_map(std::sorted_unique_t,KeyContainer,MappedContainer,Compare,Allocator)->flat_map<typenameKeyContainer::value_type,typenameMappedContainer::value_type,Compare,KeyContainer,MappedContainer>; (6) (since C++23)template<classInputIt,classCompare=std::less</*iter-key-t*/<InputIt>>>flat_map(InputIt,InputIt,Compare=Compare())->flat_map</*iter-key-t*/<InputIt>,/*iter-mapped-t*/<InputIt>,Compare>; (7) (since C++23)template<classInputIt,classCompare=std::less</*iter-key-t*/<InputIt>>>flat_map(std::sorted_unique_t,InputIt,InputIt,Compare=Compare())->flat_map</*iter-key-t*/<InputIt>,/*iter-mapped-t*/<InputIt>,Compare>; (8) (since C++23)template<ranges::input_rangeR,classCompare=std::less</*range-key-t*/<R>>,classAllocator=allocator<byte>>flat_map(std::from_range_t,R&&,Compare=Compare(),Allocator=Allocator())->flat_map</*range-key-t*/<R>,/*range-mapped-t*/<R>,Compare,std::vector</*range-key-t*/<R>,/*alloc-rebind*/<Allocator,/*range-key-t*/<R>>>,std::vector</*range-mapped-t*/<R>,/*alloc-rebind*/<Allocator,/*range-mapped-t*/<R>>>>; (9) (since C++23)template<ranges::input_rangeR,classAllocator>flat_map(std::from_range_t,R&&,Allocator)->flat_map</*range-key-t*/<R>,/*range-mapped-t*/<R>,std::less</*range-key-t*/<R>>,std::vector</*range-key-t*/<R>,/*alloc-rebind*/<Allocator,/*range-key-t*/<R>>>,std::vector</*range-mapped-t*/<R>,/*alloc-rebind*/<Allocator,/*range-mapped-t*/<R>>>>; (10) (since C++23)template<classKey,classT,classCompare=std::less<Key>>flat_map(std::initializer_list<pair<Key,T>>,Compare=Compare())->flat_map<Key,T,Compare>; (11) (since C++23)template<classKey,classT,classCompare=std::less<Key>>flat_map(std::sorted_unique_t,std::initializer_list<pair<Key,T>>,Compare=Compare())->flat_map<Key,T,Compare>; (12) (since C++23)Exposition-only helper type aliases
template<classInputIt>using/*iter-val-t*/=typenamestd::iterator_traits<InputIt>::value_type;(exposition only*)template<classInputIt>using/*iter-key-t*/=std::remove_const_t<std::tuple_element_t<0,/*iter-val-t*/<InputIt>>>;(exposition only*)template<classInputIt>using/*iter-mapped-t*/=std::tuple_element_t<1,/*iter-val-t*/<InputIt>>;(exposition only*)template<classAllocator,classT>using/*alloc-rebind*/=typenamestd::allocator_traits<Allocator>::templaterebind_alloc<T>;(exposition only*)template<ranges::input_rangeRange>using/*range-key-t*/=std::remove_const_t<typenameranges::range_value_t<Range>::first_type>;(exposition only*)template<ranges::input_rangeRange>using/*range-mapped-t*/=typenameranges::range_value_t<Range>::second_type;(exposition only*)1) A key-container, a mapped-container and a comparator.
2) A key-container, a mapped-container and an allocator.
3) A key-container, a mapped-container, a comparator and an allocator.
4) The std::sorted_unique_t tag, a key-container, a mapped-container and a comparator.
5) The std::sorted_unique_t tag, a key-container, a mapped-container and an allocator.
6) The std::sorted_unique_t tag, a key-container, a mapped-container, a comparator and an allocator.
7) An iterator range and a comparator.
8) The std::sorted_unique_t tag, an iterator range and a comparator.
These overloads participate in overload resolution only if InputIt satisfies
, Alloc satisfies
, and Comp does not satisfy
.
Note: the extent to which the library determines that a type does not satisfy
is unspecified, except that as a minimum integral types do not qualify as input iterators. Likewise, the extent to which it determines that a type does not satisfy
is unspecified, except that as a minimum the member type Alloc::value_type must exist and the expression std::declval<Alloc&>().allocate(std::size_t{}) must be well-formed when treated as an unevaluated operand.