6#include <nlohmann/json.hpp>
23 requires requires { attribute_table<T, json>::table; }
28 "' (expected object, but got " +
33 for (
auto &&
el :
j.items()) {
34 const auto &key =
el.key();
45 "Invalid key '" + key +
"' for type '" +
47 "',\n possible keys are: " +
54 throw std::logic_error(
55 "Alias '" + std::string(
alias_it->first) +
56 "' refers to nonexistent option '" +
57 std::string(
alias_it->second) +
"' in '" +
68 "',\n possible keys are: " +
74 it->second.set(t,
el.value());
84 requires requires { attribute_table<T, json>::table; }
88 for (
auto &&[k,
v] : m)
std::string demangled_typename(const std::type_info &t)
Get the pretty name of the given type as a string.
std::string join_sorted_keys(const auto &members)
void get_param(const T &t, json &s)
Get the first argument as a JSON object j.
void set_param(T &t, const json &j)
Update/overwrite the first argument based on the JSON object j.
Specialize this type to define the alternative attribute name to attribute setters dictionaries for a...
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
Double-precision double configuration.
Custom parameter parsing exception.
std::vector< std::string > backtrace