aligator 0.18.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
13
14// ostream_formatter has been introduced in FMT 9
15#if FMT_VERSION >= 90000
16template <typename MatrixType>
17struct fmt::formatter<MatrixType,
18 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
19 : fmt::ostream_formatter {};
20
21template <typename MatrixType>
22struct fmt::is_range<MatrixType,
23 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
24 : std::false_type {};
25
26template <typename MatrixType>
27struct fmt::formatter<Eigen::WithFormat<MatrixType>>
28 : public fmt::ostream_formatter {};
29#else
32template <typename MatrixType>
33struct fmt::formatter<MatrixType,
34 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
35 : fmt::formatter<std::ostream, char> {};
36
37template <typename MatrixType>
38struct fmt::is_range<MatrixType,
39 ::aligator::enable_if_eigen_dense_t<MatrixType, char>>
40 : std::false_type {};
41
42template <typename MatrixType>
43struct fmt::formatter<Eigen::WithFormat<MatrixType>>
44 : public fmt::formatter<std::ostream, char> {};
45#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:82