From 42818f6545cbaf8c13d4a9fefae3b43258e0f0e6 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 25 Jan 2024 22:41:46 -0800 Subject: [PATCH] test: update Eigen/Fmt compilation errors --- tests/myproj/include/mylib/lib.hpp | 4 ++-- tests/myproj/src/main/main.cpp | 6 +++--- tests/myproj/src/mylib2/lib.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/myproj/include/mylib/lib.hpp b/tests/myproj/include/mylib/lib.hpp index 6ecad59b..f74c7bad 100644 --- a/tests/myproj/include/mylib/lib.hpp +++ b/tests/myproj/include/mylib/lib.hpp @@ -3,7 +3,7 @@ // test external pac #include #include -#include +#include // test std libraries #include @@ -24,7 +24,7 @@ int some_fun() { auto eigen_vec = Eigen::VectorXd::LinSpaced(10, 0, 1); // print the vector - fmt::print("{}", eigen_vec); + fmt::print("[{}]", fmt::join(eigen_vec, ", ")); return 0; } diff --git a/tests/myproj/src/main/main.cpp b/tests/myproj/src/main/main.cpp index 3dc72141..25cc0b59 100644 --- a/tests/myproj/src/main/main.cpp +++ b/tests/myproj/src/main/main.cpp @@ -1,7 +1,7 @@ // test external pac #include #include -#include +#include // test std libraries #include @@ -19,11 +19,11 @@ int main() { fmt::print("Hello from fmt{}", "!"); Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); - fmt::print("{}", eigen_vec); + fmt::print("[{}]", fmt::join(eigen_vec, ", ")); #if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); - fmt::print("{}", eigen_vec2); + fmt::print("[{}]", fmt::join(eigen_vec2, ", ")); #endif // trigger address sanitizer diff --git a/tests/myproj/src/mylib2/lib.cpp b/tests/myproj/src/mylib2/lib.cpp index 38458dce..01524a76 100644 --- a/tests/myproj/src/mylib2/lib.cpp +++ b/tests/myproj/src/mylib2/lib.cpp @@ -1,7 +1,7 @@ // test external pac #include #include -#include +#include // test std libraries #include @@ -19,11 +19,11 @@ int some_fun2() { fmt::print("Hello from fmt{}", "!"); Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); - fmt::print("{}", eigen_vec); + fmt::print("[{}]", fmt::join(eigen_vec, ", ")); #if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); - fmt::print("{}", eigen_vec2); + fmt::print("[{}]", fmt::join(eigen_vec2, ", ")); #endif return 0;