名前空間
変種
操作

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

From cppreference.com
 
 
 
 
const mapped_container_type& values() const noexcept;
(C++23から)

アダプトされた値コンテナへの定数参照を返します。 `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}};
 
    // The default values container is 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) [編集]
English 日本語 中文(简体) 中文(繁體)