std::flat_map<Key,T,Compare,KeyContainer,MappedContainer>:: values
From cppreference.net
C++
Containers library
|
(C++17)
|
||||
| Sequence | ||||
|
(C++11)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
|
(C++11)
|
||||
| Associative | ||||
| Unordered associative | ||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
| Adaptors | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
| Views | ||||
|
(C++20)
|
||||
|
(C++23)
|
||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
std::flat_map
|
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_map<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]
関連項目
|
基になるキーコンテナへの直接アクセス
(公開メンバ関数) |