26#include <unordered_map>
30#include <fmt/format.h>
60 [[nodiscard]]
auto empty()
const noexcept -> bool;
80 const auto iter = data_.find(param_name);
81 if (iter == data_.end()) {
83 fmt::format(
"Parameter {} not found.", param_name));
85 return iter->second.as<T>();
112 [[nodiscard]]
auto format_to(fmt::format_context::iterator out)
const
113 -> fmt::format_context::iterator;
121 ->
std::unordered_map<
util::Utf8String,
util::Utf8String>;
146 [[nodiscard]] auto operator==(const
ParameterDict& rhs) const ->
bool;
155 [[nodiscard]] auto operator!=(const
ParameterDict& rhs) const ->
bool;
173 :
public formatter<string_view> {
182 format_context& context)
const ->
typename format_context::iterator;
203 return dict.calculate_hash();
Class of exceptions in this library.
Class of dictionaries of parameters.
auto format_to(fmt::format_context::iterator out) const -> fmt::format_context::iterator
Format to string.
auto get_as_double(const ParameterName ¶m_name) const -> double
Get a parameter value as double.
auto has(const ParameterName ¶m_name) const -> bool
Check whether this has a parameter with a name.
auto get_as_variant(const ParameterName ¶m_name) const -> ParameterValueVariant
Get a parameter value as a variant object.
auto empty() const noexcept -> bool
Check whether this is empty.
auto clone_without(const ParameterName ¶m_name) const -> ParameterDict
Create a new dictionary without a parameter.
auto as_string_dict() const -> std::unordered_map< util::Utf8String, util::Utf8String >
Get as a dictionary of string values.
ParameterDict(util::OrderedMap< ParameterName, ParameterValue > data)
Constructor.
auto calculate_hash() const -> std::size_t
Calculate hash value.
auto get(const ParameterName ¶m_name) const -> const T &
Get a parameter value.
Class of names of parameters.
Class of values of parameters.
Class of mapping which preserves order of insertion.
auto operator()(const stat_bench::param::ParameterDict &dict) const -> std::size_t
Operator.
Namespace of fmt library.
Namespace of parameters of benchmarks.
std::variant< bool, std::intmax_t, std::uintmax_t, long double, std::string > ParameterValueVariant
Type of variant of parameter values.
Namespace of utility functions and classes.
Namespace of stat_bench source codes.
Definition of OrderedMap class.
Definition of ParameterName class.
Definition of ParameterValue class.
Definition of StatBenchException class.
Definition of Utf8String class.