summaryrefslogtreecommitdiff
path: root/absl/time/internal/cctz/include/cctz
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2018-06-28 10:18:50 -0700
committerGravatar Alex Strelnikov <strel@google.com>2018-06-28 15:01:10 -0400
commitba8d6cf07766263723e86736f20a51c1c9c67b19 (patch)
treefb520ff02a8b1e34b36c4b6e2654dc530cc40671 /absl/time/internal/cctz/include/cctz
parentbe1e84b988fceabcea4fc9e93f899539f0c81901 (diff)
Export of internal Abseil changes.
-- 6769c6ebe79804063d68d70a5623a1475d63aeff by Alex Strelnikov <strel@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 202500218 -- c65cc4af08b8c48ca65f0816c1d2f59c7de7b0a5 by Derek Mauro <dmauro@google.com>: Fix DirectMMap on s390x (GitHub #135). This is *untested* because no s390x system is available. PiperOrigin-RevId: 202484458 -- 0ae7b628d7859cb3af169d007c29efd7917bb3ea by Abseil Team <absl-team@google.com>: 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
Diffstat (limited to 'absl/time/internal/cctz/include/cctz')
-rw-r--r--absl/time/internal/cctz/include/cctz/civil_time_detail.h16
1 files changed, 6 insertions, 10 deletions
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 d52eddcd..2362a4f4 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 <typename Tag1, typename Tag2>
-CONSTEXPR_F diff_t operator-(civil_time<Tag1>, civil_time<Tag2>) = delete;
+template <typename T, typename U>
+CONSTEXPR_F diff_t operator-(civil_time<T>, civil_time<U>) = delete;
using civil_year = civil_time<year_tag>;
using civil_month = civil_time<month_tag>;