- cpp17[meta cpp]
- node_handle[meta category]
- node_handle[meta class]
- function[meta id-type]
- [meta namespace]
mapped_type& mapped() const; // (1) C++17 : set コンテナには存在ない
constexpr mapped_type& mapped() const; // (1) C++26 : set コンテナには存在ないこのノードハンドルによって管理されている map コンテナ要素の mapped_type メンバ(キーではない方)を指す参照を返す。
empty() == false
ptr_ が指す container_node_type オブジェクト内の value_type サブオブジェクトの mapped_type メンバへの参照。
投げない。
#include <iostream>
#include <map>
#include <string>
int main()
{
std::map<int, std::string> m = {
{ 1, "nya" },
{ 2, "nyan" },
{ 3, "nyau" }
};
auto nh = m.extract(m.begin());
std::cout << nh.mapped();
}- mapped[color ff0000]
nya
- C++17
- Clang: 7.0.0 [mark verified]
- GCC: 7.1.0 [mark verified]
- ICC: ??
- Visual C++: 2017 Update 5 [mark verified]