userver: userver/utils/trivial_map.hpp File Reference
Loading...
Searching...
No Matches
trivial_map.hpp File Reference

Detailed Description

Bidirectional map|sets over string literals or other trivial types.

Definition in file trivial_map.hpp.

Go to the source code of this file.

#include <cstddef>
#include <optional>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <variant>
#include <fmt/format.h>
#include <userver/compiler/demangle.hpp>
#include <userver/utils/assert.hpp>
+ Include dependency graph for trivial_map.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

class  utils::TrivialBiMap< BuilderFunc >
 Bidirectional unordered map for trivial types, including string literals; could be efficiently used as a unordered non-bidirectional map. More...
 
struct  utils::TrivialBiMap< BuilderFunc >::value_type
 
class  utils::TrivialBiMap< BuilderFunc >::iterator
 
class  utils::TrivialSet< BuilderFunc >
 Unordered set for trivial types, including string literals. More...
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename BuilderFunc >
 utils::TrivialBiMap (BuilderFunc) -> TrivialBiMap< BuilderFunc >
 
template<typename BuilderFunc >
 utils::TrivialSet (BuilderFunc) -> TrivialSet< BuilderFunc >
 
template<typename ExceptionType = void, typename Value , typename BuilderFunc >
auto utils::ParseFromValueString (const Value &value, TrivialBiMap< BuilderFunc > map)
 Parses and returns whatever is specified by map from a formats::*::Value.
 
template<const auto & Keys, const auto & Values>
constexpr auto utils::MakeTrivialBiMap ()
 Zips two global constexpr arrays into an utils::TrivialBiMap.
 
template<const auto & Values>
constexpr auto utils::MakeTrivialSet ()