From 5423fa25d44f4e599975d9a841ba448690187068 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Mon, 16 Nov 2015 17:45:31 -0500 Subject: [PATCH] Change the use of integrals to chrono types as appropriate --- beast/hash/hash_append.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/beast/hash/hash_append.h b/beast/hash/hash_append.h index 6cab78cc7..5cd5c85b1 100644 --- a/beast/hash/hash_append.h +++ b/beast/hash/hash_append.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -472,6 +473,24 @@ hash_append (Hasher& h, std::shared_ptr const& p) noexcept hash_append(h, p.get()); } +// chrono + +template +inline +void +hash_append (Hasher& h, std::chrono::duration const& d) noexcept +{ + hash_append(h, d.count()); +} + +template +inline +void +hash_append (Hasher& h, std::chrono::time_point const& tp) noexcept +{ + hash_append(h, tp.time_since_epoch()); +} + // variadic template