get_ptr overloads
Declared in <folly/container/MapUtil.h>
Non-const overload of the above.
template<
class Map,
typename Key = Map::key_type>
auto
get_ptr(
Map& map,
Key const& key);
» more...
Given a map and a key, return a pointer to the corresponding value, or nullptr if the key doesn't exist in the map.
template<
class Map,
typename Key = Map::key_type>
auto
get_ptr(
Map const& map,
Key const& key);
» more...
Given a map and a key, return a pointer to the value corresponding to the key in the map, or nullptr if the key doesn't exist in the map.
template<
class Map,
typename Key = Map::key_type>
auto
get_ptr(
Map&& map,
Key const& key)
requires (!std::is_lvalue_reference_v<Map>) = delete;
» more...
Given a map pointer and a key, return a pointer to the corresponding value, or nullptr if the map is null or the key doesn't exist.
template<
class Map,
typename Key = Map::key_type>
Map::mapped_type*
get_ptr(
Map* map,
Key const& key);
» more...
Given a map pointer and a key, return a pointer to the corresponding value, or nullptr if the map is null or the key doesn't exist.
template<
class Map,
typename Key = Map::key_type>
Map::mapped_type const*
get_ptr(
Map const* map,
Key const& key);
» more...
Given a map of maps and a path of keys, return a pointer to the nested value, or nullptr if the key doesn't exist in the map.
template<
class Map,
class Key1,
class Key2,
class... Keys>
/* implementation-defined */::type*
get_ptr(
Map& map,
Key1 const& key1,
Key2 const& key2,
Keys const&... keys);
» more...
Given a map of maps and a path of keys, return a pointer to the nested value, or nullptr if the key doesn't exist in the map.
template<
class Map,
class Key1,
class Key2,
class... Keys>
/* implementation-defined */::type const*
get_ptr(
Map const& map,
Key1 const& key1,
Key2 const& key2,
Keys const&... keys);
» more...
Given a map of maps and a path of keys, return a pointer to the nested value, or nullptr if the key doesn't exist in the map.
template<
class Map,
class Key1,
class Key2,
class... Keys>
auto
get_ptr(
Map&& map,
Key1 const& key1,
Key2 const& key2,
Keys const&... keys)
requires (!std::is_lvalue_reference_v<Map>) = delete;
» more...
Given a map of maps and a path of keys, return a pointer to the nested value, or nullptr if the key doesn't exist in the map.
template<
class Map,
class Key1,
class Key2,
class... Keys>
/* implementation-defined */::type*
get_ptr(
Map* map,
Key1 const& key1,
Key2 const& key2,
Keys const&... keys);
» more...
Given a map of maps and a path of keys, return a pointer to the nested value, or nullptr if the key doesn't exist in the map.
template<
class Map,
class Key1,
class Key2,
class... Keys>
/* implementation-defined */::type const*
get_ptr(
Map const* map,
Key1 const& key1,
Key2 const& key2,
Keys const&... keys);
» more...
| Name | Description |
|---|---|
| map | The map to search. |
| key | The key to look up. |
| key1 | The first key in the path. |
| key2 | The second key in the path. |
| keys | The remaining keys in the path. |