From fe99d69d07a96ed5f48b4d8d73491b4b4e4907c6 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 11 Oct 2021 12:55:06 -0600 Subject: [PATCH] qvec: implement Google Test formatter --- include/common/qvec.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/common/qvec.hh b/include/common/qvec.hh index e4acc625..82a53cd6 100644 --- a/include/common/qvec.hh +++ b/include/common/qvec.hh @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "common/mathlib.hh" #include "common/cmdlib.hh" @@ -227,6 +228,11 @@ public: constexpr auto end() const { return v.end(); } constexpr auto cbegin() const { return v.cbegin(); } constexpr auto cend() const { return v.cend(); } + + // for Google Test + friend std::ostream& operator<<(std::ostream& os, const qvec& v) { + return os << fmt::format("{}", v); + } }; namespace qv