about summary refs log tree commit diff
path: root/absl/time/time.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-07-17T20·35-0400
committerDerek Mauro <dmauro@google.com>2019-07-17T20·40-0400
commitc6c3c1b498e4ee939b24be59cae29d59c3863be8 (patch)
tree030b875cdbbd25d2d0b7bca0b68a71351eeb2c41 /absl/time/time.h
parent44efe96dfca674a17b45ca53fc77fb69f1e29bf4 (diff)
Export of internal Abseil changes.
--
ed3a3431eee9e48e6553b0320e0308d2dde6725c by Derek Mauro <dmauro@google.com>:

Project import generated by Copybara.

PiperOrigin-RevId: 258631680
GitOrigin-RevId: ed3a3431eee9e48e6553b0320e0308d2dde6725c
Change-Id: I1d7ae86a79783842092d29504605ba039c369603
Diffstat (limited to 'absl/time/time.h')
-rw-r--r--absl/time/time.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/absl/time/time.h b/absl/time/time.h
index 0534780516d0..e236870bd829 100644
--- a/absl/time/time.h
+++ b/absl/time/time.h
@@ -179,6 +179,7 @@ class Duration {
   Duration& operator%=(Duration rhs);
 
   // Overloads that forward to either the int64_t or double overloads above.
+  // Integer operands must be representable as int64_t.
   template <typename T>
   Duration& operator*=(T r) {
     int64_t x = r;
@@ -221,6 +222,7 @@ inline Duration operator+(Duration lhs, Duration rhs) { return lhs += rhs; }
 inline Duration operator-(Duration lhs, Duration rhs) { return lhs -= rhs; }
 
 // Multiplicative Operators
+// Integer operands must be representable as int64_t.
 template <typename T>
 Duration operator*(Duration lhs, T rhs) {
   return lhs *= rhs;
@@ -375,7 +377,8 @@ constexpr Duration InfiniteDuration();
 // Hours()
 //
 // Factory functions for constructing `Duration` values from an integral number
-// of the unit indicated by the factory function's name.
+// of the unit indicated by the factory function's name. The number must be
+// representable as int64_t.
 //
 // Note: no "Days()" factory function exists because "a day" is ambiguous.
 // Civil days are not always 24 hours long, and a 24-hour duration often does