std::flat_map<Key,T,Compare,KeyContainer,MappedContainer>::keys
Min standard notice:
Return a constant reference to the adapted keys container. Equivalent to return c.keys;.
# Declarations
const key_container_type& keys() const noexcept;
(since C++23)
# Return value
The underlying keys container.
# Example
#include <flat_map>
#include <print>
#include <type_traits>
#include <vector>
int main()
{
std::flat_map<int, double> adaptor{{1, 1.1}, {2, 2.2}, {3, 3.3}};
// The default keys container is std::vector:
static_assert(std::is_same_v<decltype(adaptor.keys()), const std::vector<int>&>);
std::println("{}", adaptor.keys());
}