From 95c2c461acb31b88962a862e44983d30ebee5023 Mon Sep 17 00:00:00 2001 From: Nathan Hourt Date: Thu, 30 Oct 2014 18:26:07 -0400 Subject: [PATCH] Add missing + operator to time_point_sec time_point_sec had an operator defined for time_point_sec - microseconds, but not one for time_point_sec + microseconds. Now it does. --- include/fc/time.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/fc/time.hpp b/include/fc/time.hpp index b23af16..d83b8a4 100644 --- a/include/fc/time.hpp +++ b/include/fc/time.hpp @@ -105,6 +105,7 @@ namespace fc { time_point_sec operator +( uint32_t offset )const { return time_point_sec(utc_seconds + offset); } time_point_sec operator -( uint32_t offset )const { return time_point_sec(utc_seconds - offset); } + friend time_point operator + ( const time_point_sec& t, const microseconds& m ) { return time_point(t) + m; } friend time_point operator - ( const time_point_sec& t, const microseconds& m ) { return time_point(t) - m; } friend microseconds operator - ( const time_point_sec& t, const time_point_sec& m ) { return time_point(t) - time_point(m); } friend microseconds operator - ( const time_point& t, const time_point_sec& m ) { return time_point(t) - time_point(m); }