Skip to content

Commit

Permalink
Document that absl::Time and absl::Duration are trivially destructible.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 702027647
Change-Id: I91c3631e229d054309641f7467e1750c499ff43a
  • Loading branch information
Abseil Team authored and copybara-github committed Dec 2, 2024
1 parent c7cf999 commit 95950b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions absl/time/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ using EnableIfFloat =
// the result of subtracting one `absl::Time` from another. Durations behave
// like unit-safe integers and they support all the natural integer-like
// arithmetic operations. Arithmetic overflows and saturates at +/- infinity.
// `Duration` should be passed by value rather than const reference.
// `Duration` is trivially destructible and should be passed by value rather
// than const reference.
//
// Factory functions `Nanoseconds()`, `Microseconds()`, `Milliseconds()`,
// `Seconds()`, `Minutes()`, `Hours()` and `InfiniteDuration()` allow for
Expand Down Expand Up @@ -748,8 +749,9 @@ std::string UnparseFlag(Duration d);
// are provided for naturally expressing time calculations. Instances are
// created using `absl::Now()` and the `absl::From*()` factory functions that
// accept the gamut of other time representations. Formatting and parsing
// functions are provided for conversion to and from strings. `absl::Time`
// should be passed by value rather than const reference.
// functions are provided for conversion to and from strings. `absl::Time` is
// trivially destructible and should be passed by value rather than const
// reference.
//
// `absl::Time` assumes there are 60 seconds in a minute, which means the
// underlying time scales must be "smeared" to eliminate leap seconds.
Expand Down

0 comments on commit 95950b3

Please sign in to comment.