diff --git a/absl/time/duration_test.cc b/absl/time/duration_test.cc index 416bf3ca4eb..573a76ab68f 100644 --- a/absl/time/duration_test.cc +++ b/absl/time/duration_test.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include "gmock/gmock.h" #include "gtest/gtest.h" @@ -74,6 +75,8 @@ MATCHER_P(TimevalMatcher, tv, "") { } TEST(Duration, ConstExpr) { + static_assert(std::is_trivially_destructible::value, + "Duration is documented as being trivially destructible"); constexpr absl::Duration d0 = absl::ZeroDuration(); static_assert(d0 == absl::ZeroDuration(), "ZeroDuration()"); constexpr absl::Duration d1 = absl::Seconds(1); diff --git a/absl/time/time_test.cc b/absl/time/time_test.cc index 69e93e98ee4..6f21008ac8d 100644 --- a/absl/time/time_test.cc +++ b/absl/time/time_test.cc @@ -37,6 +37,7 @@ #include #include #include +#include #include "gmock/gmock.h" #include "gtest/gtest.h" @@ -89,6 +90,8 @@ MATCHER_P(TimevalMatcher, tv, "") { } TEST(Time, ConstExpr) { + static_assert(std::is_trivially_destructible::value, + "Time is documented as being trivially destructible"); constexpr absl::Time t0 = absl::UnixEpoch(); static_assert(t0 == absl::UnixEpoch(), "UnixEpoch"); constexpr absl::Time t1 = absl::InfiniteFuture();