Namespaces
Variants

std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>:: values

From cppreference.net

const mapped_container_type & values ( ) const noexcept ;
(C++23부터)

적응된 값 컨테이너의 상수 참조를 반환합니다. 다음 코드와 동일합니다: return c. values ; .

목차

매개변수

(없음)

반환값

기본 값 컨테이너.

복잡도

상수.

예제

#include <flat_map>
#include <print>
#include <type_traits>
#include <vector>
int main()
{
    std::flat_multimap<int, double> map{{1, 1.1}, {2, 2.2}, {3, 3.3}};
    // 기본 값 컨테이너는 std::vector입니다:
    static_assert(std::is_same_v<decltype(map.values()), const std::vector<int>&>);
    std::println("{}", map.values());
}

출력:

[1.1, 2.2, 3.3]

참고 항목

기본 키 컨테이너에 대한 직접 접근
(public member function)