aligator 0.19.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Loading...
Searching...
No Matches
fmt-eigen.hpp
Go to the documentation of this file.
1
3#pragma once
4
5#include "math.hpp"
6
7#include <fmt/core.h>
8#include <fmt/ostream.h>
9#include <fmt/ranges.h>
10#include <fmt/format.h>
11
14
15// ostream_formatter has been introduced in FMT 9
16#if FMT_VERSION >= 90000
17template <typename MatrixType>
18struct fmt::formatter<MatrixType,
19 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
20 : fmt::ostream_formatter {};
21
22template <typename MatrixType>
23struct fmt::is_range<MatrixType,
24 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
25 : std::false_type {};
26
27template <typename MatrixType>
28struct fmt::formatter<Eigen::WithFormat<MatrixType>>
29 : public fmt::ostream_formatter {};
30#else
33template <typename MatrixType>
34struct fmt::formatter<MatrixType,
35 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
36 : fmt::formatter<std::ostream, char> {};
37
38template <typename MatrixType>
39struct fmt::is_range<MatrixType,
40 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
41 : std::false_type {};
42
43template <typename MatrixType>
44struct fmt::formatter<Eigen::WithFormat<MatrixType>>
45 : public fmt::formatter<std::ostream, char> {};
46#endif // if FMT_VERSION >= 90000
Math utilities.
std::enable_if_t< is_eigen_dense_v< T >, T2 > enable_if_eigen_dense_t
Definition math.hpp:83