CBMC
optional_utils.h File Reference
#include <optional>
+ Include dependency graph for optional_utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename map_like_collectiont , typename keyt >
auto optional_lookup (const map_like_collectiont &map, const keyt &key) -> std::optional< decltype(map.find(key) ->second)>
 Lookup a key in a map, if found return the associated value, nullopt otherwise. More...
 

Function Documentation

◆ optional_lookup()

template<typename map_like_collectiont , typename keyt >
auto optional_lookup ( const map_like_collectiont &  map,
const keyt &  key 
) -> std::optional<decltype(map.find(key)->second)>

Lookup a key in a map, if found return the associated value, nullopt otherwise.

Definition at line 17 of file optional_utils.h.