Began working on mfem_resolver formatters

This commit is contained in:
2026-09-19 08:52:30 -04:00
parent c44584c1e7
commit f69fac8f1e
5 changed files with 59 additions and 6 deletions

View File

@@ -71,7 +71,7 @@ namespace serif::utils::errors {
// Note if we move to C++26 we can replace this with a more standard and less convoluted
// formated static_assert.
sizeof(serif_error_printer<message, code>);
[[maybe_unused]] std::size_t error_kick = sizeof(serif_error_printer<message, code>);
}
}
}

View File

@@ -0,0 +1,19 @@
#pragma once
#include <string>
#include <string_view>
#include <span>
#include <format>
#include <type_traits>
namespace serif::utils::misc::format {
template <typename T>
std::string join(const std::span<T>& elements, std::string_view delimiter)
{
std::string out;
for (const auto& element : elements) {
out = std::format("{}{}{}", out, delimiter, element);
}
return out;
}
}

View File

@@ -3,6 +3,7 @@
#include <string_view>
#include <cstdio>
#include <cstdlib>
#include <utility>
#include <unistd.h>
namespace serif::utils::misc::terminal {
@@ -71,4 +72,4 @@ namespace serif::utils::misc::terminal {
return std::string_view(term) != "dumb";
}
}
}