18 "' cannot be indexed in '" +
28 std::string(s.full_key) +
"'");
35 template <
class T_actual,
class A>
50 auto it = m.find(key);
52 auto keys = std::views::keys(m);
56 "Invalid key '" + std::string(key) +
"' for type '" +
58 "',\n possible keys are: " +
std::string demangled_typename(const std::type_info &t)
Get the pretty name of the given type as a string.
void unsupported_type(T &, ParamString s)
Throw a meaningful error to indicate that parameters of type T are not supported or implemented.
std::string_view key
The subkey to resolve next.
void assert_key_empty(ParamString s)
Throw a meaningful error when s.key is not empty, to indicate that the given type T is not of struct ...
std::string_view full_key
Full key string, used for diagnostics.
auto split_key(std::string_view full, char tok='.')
Split the string full on the first occurrence of tok.
void set_param(T &t, const json &j)
Update/overwrite the first argument based on the JSON object j.
Represents a parameter value encoded as a string in the format abc.def.key=value.
Function wrapper to set attributes of a struct, type-erasing the type of the attribute.
Specialize this type to define the attribute name to attribute setters dictionaries for a struct type...
std::string join(std::ranges::input_range auto strings, join_opt opt={})
Join the list of strings into a single string, using the separator given by opt.
void sort_case_insensitive(auto &range)
Sort the given range of strings in-place in a case-insensitive manner.
EigenConfigd DefaultConfig
attribute_accessor(A T_actual::*attr)
std::function< void(T &, const ParamString &)> set
Custom parameter parsing exception.