OGS
FormattingUtils.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <spdlog/fmt/bundled/ostream.h>
14
15#include <Eigen/Core>
16#include <concepts>
17
18#include "mathlib_export.h"
19
20namespace MathLib
21{
23{
24 static MATHLIB_EXPORT const Eigen::IOFormat full_precision;
25};
26} // namespace MathLib
27
28template <typename T>
29 requires std::derived_from<T, Eigen::DenseBase<T>>
30struct fmt::formatter<T> : fmt::ostream_formatter
31{
32 auto format(T const& value, fmt::format_context& ctx) const
33 {
34 return fmt::ostream_formatter::format(
36 }
37};
#define MATHLIB_EXPORT
static MATHLIB_EXPORT const Eigen::IOFormat full_precision
auto format(T const &value, fmt::format_context &ctx) const