From fa9f434df89745ab5a0fd1d6c07800cbe802de03 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 7 May 2025 00:57:44 +0200 Subject: [PATCH] test: Allow time_point in boost checks This is required in the next commit. --- src/test/util/common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/test/util/common.h b/src/test/util/common.h index 591f651fbaf..2fa4cb3cfe7 100644 --- a/src/test/util/common.h +++ b/src/test/util/common.h @@ -5,8 +5,9 @@ #ifndef BITCOIN_TEST_UTIL_COMMON_H #define BITCOIN_TEST_UTIL_COMMON_H -#include +#include #include +#include #include /** @@ -27,6 +28,12 @@ private: // Make types usable in BOOST_CHECK_* @{ namespace std { +template +inline std::ostream& operator<<(std::ostream& os, const std::chrono::time_point& tp) +{ + return os << tp.time_since_epoch().count(); +} + template requires std::is_enum_v inline std::ostream& operator<<(std::ostream& os, const T& e) {