From ba8d6cf07766263723e86736f20a51c1c9c67b19 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 28 Jun 2018 10:18:50 -0700 Subject: Export of internal Abseil changes. -- 6769c6ebe79804063d68d70a5623a1475d63aeff by Alex Strelnikov : Import of CCTZ from GitHub. PiperOrigin-RevId: 202500218 -- c65cc4af08b8c48ca65f0816c1d2f59c7de7b0a5 by Derek Mauro : Fix DirectMMap on s390x (GitHub #135). This is *untested* because no s390x system is available. PiperOrigin-RevId: 202484458 -- 0ae7b628d7859cb3af169d007c29efd7917bb3ea by Abseil Team : Changes the Holder's compile-type type decision making to a std::conditional for improved readability PiperOrigin-RevId: 202340646 GitOrigin-RevId: 6769c6ebe79804063d68d70a5623a1475d63aeff Change-Id: I8f9d049ee279b1b1e3381fdf7e6fe9a4ea228306 --- absl/time/internal/cctz/include/cctz/civil_time_detail.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'absl/time/internal') diff --git a/absl/time/internal/cctz/include/cctz/civil_time_detail.h b/absl/time/internal/cctz/include/cctz/civil_time_detail.h index d52eddcdba06..2362a4f4fbc9 100644 --- a/absl/time/internal/cctz/include/cctz/civil_time_detail.h +++ b/absl/time/internal/cctz/include/cctz/civil_time_detail.h @@ -403,20 +403,16 @@ class civil_time { } // Binary arithmetic operators. - inline friend CONSTEXPR_M civil_time operator+(civil_time a, - diff_t n) noexcept { + friend CONSTEXPR_F civil_time operator+(civil_time a, diff_t n) noexcept { return a += n; } - inline friend CONSTEXPR_M civil_time operator+(diff_t n, - civil_time a) noexcept { + friend CONSTEXPR_F civil_time operator+(diff_t n, civil_time a) noexcept { return a += n; } - inline friend CONSTEXPR_M civil_time operator-(civil_time a, - diff_t n) noexcept { + friend CONSTEXPR_F civil_time operator-(civil_time a, diff_t n) noexcept { return a -= n; } - inline friend CONSTEXPR_M diff_t operator-(const civil_time& lhs, - const civil_time& rhs) noexcept { + friend CONSTEXPR_F diff_t operator-(civil_time lhs, civil_time rhs) noexcept { return difference(T{}, lhs.f_, rhs.f_); } @@ -434,8 +430,8 @@ class civil_time { // Disallows difference between differently aligned types. // auto n = civil_day(...) - civil_hour(...); // would be confusing. -template -CONSTEXPR_F diff_t operator-(civil_time, civil_time) = delete; +template +CONSTEXPR_F diff_t operator-(civil_time, civil_time) = delete; using civil_year = civil_time; using civil_month = civil_time; -- cgit 1.4.1