3 #include <fmt/format.h>
5 #include <nlohmann/json.hpp>
8 #include "../AttributeDescription.hpp"
11 const std::string_view& path,
12 const std::optional<uint8_t>& dimension,
13 const std::optional<attribute::AttributeType>& type)
16 if (type.has_value()) {
22 if (type.has_value() && dimension.has_value()) {
23 return fmt::format(
"named {} on {}-simplices of type {}", path, dimension.value(), typestr);
24 }
else if (dimension.has_value()) {
25 return fmt::format(
"named {} on {}-simplices", path, dimension.value());
26 }
else if (type.has_value()) {
27 return fmt::format(
"named {} of type {}", path, typestr);
29 return fmt::format(
"named {}", path);
std::string make_named_error_string(const std::string_view &path, const std::optional< uint8_t > &dimension, const std::optional< attribute::AttributeType > &type)
std::optional< attribute::AttributeType > type
std::optional< uint8_t > dimension