[libcxx] r344580 - Revert r344529 "Implement the first part of the calendar support for C++20"

Artem Dergachev artem.dergachev at gmail.com
Mon Oct 15 19:40:42 PDT 2018


Author: dergachev
Date: Mon Oct 15 19:40:42 2018
New Revision: 344580

URL: http://llvm.org/viewvc/llvm-project?rev=344580&view=rev
Log:
Revert r344529 "Implement the first part of the calendar support for C++20"
Revert r344535 "Wrap up the new chrono literals in an #ifdef..."
Revert r344546 "Mark a couple of test cases as 'C++17-only'..."

Some of the buildbot failures were masked by another error,
and this one was probably missed.

Removed:
    libcxx/trunk/test/std/utilities/time/days.pass.cpp
    libcxx/trunk/test/std/utilities/time/months.pass.cpp
    libcxx/trunk/test/std/utilities/time/time.cal/
    libcxx/trunk/test/std/utilities/time/weeks.pass.cpp
    libcxx/trunk/test/std/utilities/time/years.pass.cpp
Modified:
    libcxx/trunk/include/__config
    libcxx/trunk/include/chrono
    libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp
    libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp
    libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp
    libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
    libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=344580&r1=344579&r2=344580&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Mon Oct 15 19:40:42 2018
@@ -492,11 +492,6 @@ namespace std {
 
 #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__))
 
-// No apple compilers support ""d and ""y at this time.
-#if _LIBCPP_CLANG_VER < 800 || defined(__apple_build_version__)
-#define	_LIBCPP_HAS_NO_CXX20_CHRONO_LITERALS
-#endif
-
 #elif defined(_LIBCPP_COMPILER_GCC)
 
 #define _ALIGNAS(x) __attribute__((__aligned__(x)))

Modified: libcxx/trunk/include/chrono
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/chrono?rev=344580&r1=344579&r2=344580&view=diff
==============================================================================
--- libcxx/trunk/include/chrono (original)
+++ libcxx/trunk/include/chrono Mon Oct 15 19:40:42 2018
@@ -748,7 +748,6 @@ unspecified
     parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
           basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
 
-// calendrical constants
 inline constexpr last_spec                              last{};       // C++20
 inline constexpr chrono::weekday                        Sunday{0};    // C++20
 inline constexpr chrono::weekday                        Monday{1};    // C++20
@@ -1092,12 +1091,7 @@ typedef duration<long long,        milli
 typedef duration<long long              > seconds;
 typedef duration<     long, ratio<  60> > minutes;
 typedef duration<     long, ratio<3600> > hours;
-#if _LIBCPP_STD_VER > 17
-typedef duration<     int, ratio_multiply<ratio<24>, hours::period>>         days;
-typedef duration<     int, ratio_multiply<ratio<7>,   days::period>>         weeks;
-typedef duration<     int, ratio_multiply<ratio<146097, 400>, days::period>> years;
-typedef duration<     int, ratio_divide<years::period, ratio<12>>>           months;
-#endif
+
 // Duration ==
 
 template <class _LhsDuration, class _RhsDuration>
@@ -1580,1020 +1574,6 @@ typedef steady_clock high_resolution_clo
 typedef system_clock high_resolution_clock;
 #endif
 
-#if _LIBCPP_STD_VER > 17
-
-struct _LIBCPP_TYPE_VIS last_spec { explicit last_spec() = default; };
-
-
-class _LIBCPP_TYPE_VIS day {
-private:
-    unsigned char __d;
-public:
-    day() = default;
-    explicit inline constexpr day(unsigned __val) noexcept : __d(static_cast<unsigned char>(__val)) {}
-    inline constexpr day& operator++()    noexcept { ++__d; return *this; }
-    inline constexpr day  operator++(int) noexcept { day __tmp = *this; ++(*this); return __tmp; }
-    inline constexpr day& operator--()    noexcept { --__d; return *this; }
-    inline constexpr day  operator--(int) noexcept { day __tmp = *this; --(*this); return __tmp; }
-           constexpr day& operator+=(const days& __dd) noexcept;
-           constexpr day& operator-=(const days& __dd) noexcept;
-    explicit inline constexpr operator unsigned() const noexcept { return __d; }
-    inline constexpr bool ok() const noexcept { return __d >= 1 && __d <= 31; }
-  };
-
-
-inline constexpr
-bool operator==(const day& __lhs, const day& __rhs) noexcept
-{ return static_cast<unsigned>(__lhs) == static_cast<unsigned>(__rhs); }
-
-inline constexpr
-bool operator!=(const day& __lhs, const day& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const day& __lhs, const day& __rhs) noexcept
-{ return static_cast<unsigned>(__lhs) <  static_cast<unsigned>(__rhs); }
-
-inline constexpr
-bool operator> (const day& __lhs, const day& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const day& __lhs, const day& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-inline constexpr
-bool operator>=(const day& __lhs, const day& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-inline constexpr
-day operator+ (const day& __lhs, const days& __rhs) noexcept
-{ return day(static_cast<unsigned>(__lhs) + __rhs.count()); }
-
-inline constexpr
-day operator+ (const days& __lhs, const day& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-day operator- (const day& __lhs, const days& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-inline constexpr
-days operator-(const day& __lhs, const day& __rhs) noexcept
-{ return days(static_cast<int>(static_cast<unsigned>(__lhs)) -
-              static_cast<int>(static_cast<unsigned>(__rhs))); }
-
-inline constexpr day& day::operator+=(const days& __dd) noexcept
-{ *this = *this + __dd; return *this; }
-
-inline constexpr day& day::operator-=(const days& __dd) noexcept
-{ *this = *this - __dd; return *this; }
-
-
-class _LIBCPP_TYPE_VIS month {
-private:
-    unsigned char __m;
-public:
-    month() = default;
-    explicit inline constexpr month(unsigned __val) noexcept : __m(static_cast<unsigned char>(__val)) {}
-    inline constexpr month& operator++()    noexcept { ++__m; return *this; }
-    inline constexpr month  operator++(int) noexcept { month __tmp = *this; ++(*this); return __tmp; }
-    inline constexpr month& operator--()    noexcept { --__m; return *this; }
-    inline constexpr month  operator--(int) noexcept { month __tmp = *this; --(*this); return __tmp; }
-           constexpr month& operator+=(const months& __m1) noexcept;
-           constexpr month& operator-=(const months& __m1) noexcept;
-    explicit inline constexpr operator unsigned() const noexcept { return __m; }
-    inline constexpr bool ok() const noexcept { return __m >= 1 && __m <= 12; }
-};
-
-
-inline constexpr
-bool operator==(const month& __lhs, const month& __rhs) noexcept
-{ return static_cast<unsigned>(__lhs) == static_cast<unsigned>(__rhs); }
-
-inline constexpr
-bool operator!=(const month& __lhs, const month& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const month& __lhs, const month& __rhs) noexcept
-{ return static_cast<unsigned>(__lhs)  < static_cast<unsigned>(__rhs); }
-
-inline constexpr
-bool operator> (const month& __lhs, const month& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const month& __lhs, const month& __rhs) noexcept
-{ return !(__rhs < __lhs); }
-
-inline constexpr
-bool operator>=(const month& __lhs, const month& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-inline constexpr
-month operator+ (const month& __lhs, const months& __rhs) noexcept
-{
-    auto const __mu = static_cast<long long>(static_cast<unsigned>(__lhs)) + (__rhs.count() - 1);
-    auto const __yr = (__mu >= 0 ? __mu : __mu - 11) / 12;
-    return month{static_cast<unsigned>(__mu - __yr * 12 + 1)};
-}
-
-inline constexpr
-month operator+ (const months& __lhs, const month& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-month operator- (const month& __lhs, const months& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-inline constexpr
-months operator-(const month& __lhs, const month& __rhs) noexcept
-{
-    auto const __dm = static_cast<unsigned>(__lhs) - static_cast<unsigned>(__rhs);
-    return months(__dm <= 11 ? __dm : __dm + 12);
-}
-
-inline constexpr month& month::operator+=(const months& __dm) noexcept
-{ *this = *this + __dm; return *this; }
-
-inline constexpr month& month::operator-=(const months& __dm) noexcept
-{ *this = *this - __dm; return *this; }
-
-
-class _LIBCPP_TYPE_VIS year {
-private:
-    short __y;
-public:
-    year() = default;
-    explicit inline constexpr year(int __val) noexcept : __y(static_cast<short>(__val)) {}
-
-    inline constexpr year& operator++()    noexcept { ++__y; return *this; };
-    inline constexpr year  operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; };
-    inline constexpr year& operator--()    noexcept { --__y; return *this; };
-    inline constexpr year  operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; };
-           constexpr year& operator+=(const years& __dy) noexcept;
-           constexpr year& operator-=(const years& __dy) noexcept;
-    inline constexpr year operator+() const noexcept { return *this; }
-    inline constexpr year operator-() const noexcept { return year{-__y}; };
-
-    inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 400 == 0); }
-    explicit inline constexpr operator int() const noexcept { return __y; }
-           constexpr bool ok() const noexcept;
-    static inline constexpr year min() noexcept { return year{-32767}; }
-    static inline constexpr year max() noexcept { return year{ 32767}; }
-};
-
-
-inline constexpr
-bool operator==(const year& __lhs, const year& __rhs) noexcept
-{ return static_cast<int>(__lhs) == static_cast<int>(__rhs); }
-
-inline constexpr
-bool operator!=(const year& __lhs, const year& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const year& __lhs, const year& __rhs) noexcept
-{ return static_cast<int>(__lhs)  < static_cast<int>(__rhs); }
-
-inline constexpr
-bool operator> (const year& __lhs, const year& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const year& __lhs, const year& __rhs) noexcept
-{ return !(__rhs < __lhs); }
-
-inline constexpr
-bool operator>=(const year& __lhs, const year& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-inline constexpr
-year operator+ (const year& __lhs, const years& __rhs) noexcept
-{ return year(static_cast<int>(__lhs) + __rhs.count()); }
-
-inline constexpr
-year operator+ (const years& __lhs, const year& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year operator- (const year& __lhs, const years& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-inline constexpr
-years operator-(const year& __lhs, const year& __rhs) noexcept
-{ return years{static_cast<int>(__lhs) - static_cast<int>(__rhs)}; }
-
-
-inline constexpr year& year::operator+=(const years& __dy) noexcept
-{ *this = *this + __dy; return *this; }
-
-inline constexpr year& year::operator-=(const years& __dy) noexcept
-{ *this = *this - __dy; return *this; }
-
-inline constexpr bool year::ok() const noexcept
-{ return static_cast<int>(min()) <= __y && __y <= static_cast<int>(max()); }
-
-class _LIBCPP_TYPE_VIS weekday_indexed;
-class _LIBCPP_TYPE_VIS weekday_last;
-
-class _LIBCPP_TYPE_VIS weekday {
-private:
-    unsigned char __wd;
-public:
-  weekday() = default;
-  explicit inline constexpr weekday(unsigned __val) noexcept: __wd(static_cast<unsigned char>(__val)) {}
-//   inline constexpr weekday(const sys_days& dp) noexcept;
-//   explicit constexpr weekday(const local_days& dp) noexcept;
-  inline constexpr weekday& operator++()    noexcept { __wd = (__wd == 6 ? 0 : __wd + 1); return *this; }
-  inline constexpr weekday  operator++(int) noexcept { weekday __tmp = *this; ++(*this); return __tmp; }
-  inline constexpr weekday& operator--()    noexcept { __wd = (__wd == 0 ? 6 : __wd - 1); return *this; }
-  inline constexpr weekday  operator--(int) noexcept { weekday __tmp = *this; --(*this); return __tmp; }
-         constexpr weekday& operator+=(const days& __dd) noexcept;
-         constexpr weekday& operator-=(const days& __dd) noexcept;
-  explicit inline constexpr operator unsigned() const noexcept { return __wd; }
-  inline constexpr bool ok() const noexcept { return __wd <= 6; }
-  constexpr weekday_indexed operator[](unsigned __index) const noexcept;
-  constexpr weekday_last    operator[](last_spec) const noexcept;
-};
-
-inline constexpr
-bool operator==(const weekday& __lhs, const weekday& __rhs) noexcept
-{ return static_cast<unsigned>(__lhs) == static_cast<unsigned>(__rhs); }
-
-inline constexpr
-bool operator!=(const weekday& __lhs, const weekday& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const weekday& __lhs, const weekday& __rhs) noexcept
-{ return static_cast<unsigned>(__lhs) <  static_cast<unsigned>(__rhs); }
-
-inline constexpr
-bool operator> (const weekday& __lhs, const weekday& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const weekday& __lhs, const weekday& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-inline constexpr
-bool operator>=(const weekday& __lhs, const weekday& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-constexpr weekday operator+(const weekday& __lhs, const days& __rhs) noexcept
-{
-    auto const __mu = static_cast<long long>(static_cast<unsigned>(__lhs)) + __rhs.count();
-    auto const __yr = (__mu >= 0 ? __mu : __mu - 6) / 7;
-    return weekday{static_cast<unsigned>(__mu - __yr * 7)};
-}
-
-constexpr weekday operator+(const days& __lhs, const weekday& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-constexpr weekday operator-(const weekday& __lhs, const days& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-constexpr days operator-(const weekday& __lhs, const weekday& __rhs) noexcept
-{
-    const int __wdu = static_cast<unsigned>(__lhs) - static_cast<unsigned>(__rhs);
-    const int __wk = (__wdu >= 0 ? __wdu : __wdu-6) / 7;
-    return days{__wdu - __wk * 7};
-}
-
-inline constexpr weekday& weekday::operator+=(const days& __dd) noexcept
-{ *this = *this + __dd; return *this; }
-
-inline constexpr weekday& weekday::operator-=(const days& __dd) noexcept
-{ *this = *this - __dd; return *this; }
-
-
-class _LIBCPP_TYPE_VIS weekday_indexed {
-private:
-    _VSTD::chrono::weekday __wd;
-    unsigned char          __idx;
-public:
-    weekday_indexed() = default;
-    inline constexpr weekday_indexed(const _VSTD::chrono::weekday& __wdval, unsigned __idxval) noexcept
-        : __wd{__wdval}, __idx(__idxval) {}
-    inline constexpr _VSTD::chrono::weekday weekday() const noexcept { return __wd; }
-    inline constexpr unsigned                 index() const noexcept { return __idx; }
-    inline constexpr bool ok() const noexcept { return __wd.ok() && __idx >= 1 && __idx <= 5; }
-};
-
-inline constexpr
-bool operator==(const weekday_indexed& __lhs, const weekday_indexed& __rhs) noexcept
-{ return __lhs.weekday() == __rhs.weekday() && __lhs.index() == __rhs.index(); }
-
-inline constexpr
-bool operator!=(const weekday_indexed& __lhs, const weekday_indexed& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-
-class _LIBCPP_TYPE_VIS weekday_last {
-private:
-    _VSTD::chrono::weekday __wd;
-public:
-    explicit constexpr weekday_last(const _VSTD::chrono::weekday& __val) noexcept
-        : __wd{__val} {}
-    constexpr _VSTD::chrono::weekday weekday() const noexcept { return __wd; }
-    constexpr bool ok() const noexcept { return __wd.ok(); }
-};
-
-inline constexpr
-bool operator==(const weekday_last& __lhs, const weekday_last& __rhs) noexcept
-{ return __lhs.weekday() == __rhs.weekday(); }
-
-inline constexpr
-bool operator!=(const weekday_last& __lhs, const weekday_last& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-weekday_indexed weekday::operator[](unsigned __index) const noexcept { return weekday_indexed{*this, __index}; }
-
-inline constexpr 
-weekday_last    weekday::operator[](last_spec) const noexcept { return weekday_last{*this}; }
-
-
-inline constexpr last_spec last{};
-inline constexpr weekday   Sunday{0};
-inline constexpr weekday   Monday{1};
-inline constexpr weekday   Tuesday{2};
-inline constexpr weekday   Wednesday{3};
-inline constexpr weekday   Thursday{4};
-inline constexpr weekday   Friday{5};
-inline constexpr weekday   Saturday{6};
-
-inline constexpr month January{1};
-inline constexpr month February{2};
-inline constexpr month March{3};
-inline constexpr month April{4};
-inline constexpr month May{5};
-inline constexpr month June{6};
-inline constexpr month July{7};
-inline constexpr month August{8};
-inline constexpr month September{9};
-inline constexpr month October{10};
-inline constexpr month November{11};
-inline constexpr month December{12};
-
-
-class _LIBCPP_TYPE_VIS month_day {
-private:
-   chrono::month __m;
-   chrono::day   __d;
-public:
-    month_day() = default;
-    constexpr month_day(const chrono::month& __mval, const chrono::day& __dval) noexcept
-        : __m{__mval}, __d{__dval} {}
-    inline constexpr chrono::month month() const noexcept { return __m; }
-    inline constexpr chrono::day   day()   const noexcept { return __d; }
-    constexpr bool ok() const noexcept;
-};
-
-inline constexpr
-bool month_day::ok() const noexcept
-{
-    if (!__m.ok()) return false;
-    const unsigned __dval = static_cast<unsigned>(__d);
-    if (__dval < 1 || __dval > 31) return false;
-    if (__dval <= 29) return true;
-//  Now we've got either 30 or 31
-    const unsigned __mval = static_cast<unsigned>(__m);
-    if (__mval == 2) return false;
-    if (__mval == 4 || __mval == 6 || __mval == 9 || __mval == 11)
-        return __dval == 30;
-    return true;
-}
-
-inline constexpr
-bool operator==(const month_day& __lhs, const month_day& __rhs) noexcept
-{ return __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day(); }
-
-inline constexpr
-bool operator!=(const month_day& __lhs, const month_day& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-month_day operator/(const month& __lhs, const day& __rhs) noexcept
-{ return month_day{__lhs, __rhs}; }
-
-constexpr
-month_day operator/(const day& __lhs, const month& __rhs) noexcept
-{ return __rhs / __lhs; }
-
-inline constexpr
-month_day operator/(const month& __lhs, int __rhs) noexcept
-{ return __lhs / day(__rhs); }
-
-constexpr
-month_day operator/(int __lhs, const day& __rhs) noexcept
-{ return month(__lhs) / __rhs; }
-
-constexpr
-month_day operator/(const day& __lhs, int __rhs) noexcept
-{ return month(__rhs) / __lhs; }
-
-
-inline constexpr
-bool operator< (const month_day& __lhs, const month_day& __rhs) noexcept
-{ return __lhs.month() != __rhs.month() ? __lhs.month() < __rhs.month() : __lhs.day() < __rhs.day(); }
-
-inline constexpr
-bool operator> (const month_day& __lhs, const month_day& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const month_day& __lhs, const month_day& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-inline constexpr
-bool operator>=(const month_day& __lhs, const month_day& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-
-
-class _LIBCPP_TYPE_VIS month_day_last {
-private:
-    chrono::month __m;
-public:
-    explicit constexpr month_day_last(const chrono::month& __val) noexcept
-        : __m{__val} {}
-    inline constexpr chrono::month month() const noexcept { return __m; }
-    inline constexpr bool ok() const noexcept { return __m.ok(); }
-};
-
-inline constexpr
-bool operator==(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return __lhs.month() == __rhs.month(); }
-
-inline constexpr
-bool operator!=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return __lhs.month() < __rhs.month(); }
-
-inline constexpr
-bool operator> (const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-inline constexpr
-bool operator>=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-inline constexpr
-month_day_last operator/(const month& __lhs, last_spec) noexcept
-{ return month_day_last{__lhs}; }
-
-inline constexpr
-month_day_last operator/(last_spec, const month& __rhs) noexcept
-{ return month_day_last{__rhs}; }
-
-inline constexpr
-month_day_last operator/(int __lhs, last_spec) noexcept
-{ return month_day_last{month(__lhs)}; }
-
-inline constexpr
-month_day_last operator/(last_spec, int __rhs) noexcept
-{ return month_day_last{month(__rhs)}; }
-
-
-class _LIBCPP_TYPE_VIS month_weekday {
-private:
-    chrono::month __m;
-    chrono::weekday_indexed __wdi;
-public:
-    month_weekday() = default;
-    constexpr month_weekday(const chrono::month& __mval, const chrono::weekday_indexed& __wdival) noexcept
-        : __m{__mval}, __wdi{__wdival} {}
-    inline constexpr chrono::month                     month() const noexcept { return __m; }
-    inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
-    inline constexpr bool                                 ok() const noexcept { return __m.ok() && __wdi.ok(); }
-};
-
-inline constexpr
-bool operator==(const month_weekday& __lhs, const month_weekday& __rhs) noexcept
-{ return __lhs.month() == __rhs.month() && __lhs.weekday_indexed() == __rhs.weekday_indexed(); }
-
-inline constexpr
-bool operator!=(const month_weekday& __lhs, const month_weekday& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-month_weekday operator/(const month& __lhs, const weekday_indexed& __rhs) noexcept
-{ return month_weekday{__lhs, __rhs}; }
-
-inline constexpr
-month_weekday operator/(int __lhs, const weekday_indexed& __rhs) noexcept
-{ return month_weekday{month(__lhs), __rhs}; }
-
-inline constexpr
-month_weekday operator/(const weekday_indexed& __lhs, const month& __rhs) noexcept
-{ return month_weekday{__rhs, __lhs}; }
-
-inline constexpr
-month_weekday operator/(const weekday_indexed& __lhs, int __rhs) noexcept
-{ return month_weekday{month(__rhs), __lhs}; }
-
-
-class _LIBCPP_TYPE_VIS month_weekday_last {
-    chrono::month        __m;
-    chrono::weekday_last __wdl;
-  public:
-    constexpr month_weekday_last(const chrono::month& __mval, const chrono::weekday_last& __wdlval) noexcept
-        : __m{__mval}, __wdl{__wdlval} {}
-    inline constexpr chrono::month               month() const noexcept { return __m; }
-    inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
-    inline constexpr bool                           ok() const noexcept { return __m.ok() && __wdl.ok(); }
-};
-
-inline constexpr
-bool operator==(const month_weekday_last& __lhs, const month_weekday_last& __rhs) noexcept
-{ return __lhs.month() == __rhs.month() && __lhs.weekday_last() == __rhs.weekday_last(); }
-
-inline constexpr
-bool operator!=(const month_weekday_last& __lhs, const month_weekday_last& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-
-inline constexpr
-month_weekday_last operator/(const month& __lhs, const weekday_last& __rhs) noexcept
-{ return month_weekday_last{__lhs, __rhs}; }
-
-inline constexpr
-month_weekday_last operator/(int __lhs, const weekday_last& __rhs) noexcept
-{ return month_weekday_last{month(__lhs), __rhs}; }
-
-inline constexpr
-month_weekday_last operator/(const weekday_last& __lhs, const month& __rhs) noexcept
-{ return month_weekday_last{__rhs, __lhs}; }
-
-inline constexpr
-month_weekday_last operator/(const weekday_last& __lhs, int __rhs) noexcept
-{ return month_weekday_last{month(__rhs), __lhs}; }
-
-
-class _LIBCPP_TYPE_VIS year_month {
-    chrono::year  __y;
-    chrono::month __m;
-public:
-    year_month() = default;
-    constexpr year_month(const chrono::year& __yval, const chrono::month& __mval) noexcept
-        : __y{__yval}, __m{__mval} {}
-    inline constexpr chrono::year  year()  const noexcept { return __y; }
-    inline constexpr chrono::month month() const noexcept { return __m; }
-    inline constexpr year_month& operator+=(const months& __dm) noexcept { this->__m += __dm; return *this; }
-    inline constexpr year_month& operator-=(const months& __dm) noexcept { this->__m -= __dm; return *this; }
-    inline constexpr year_month& operator+=(const years& __dy)  noexcept { this->__y += __dy; return *this; }
-    inline constexpr year_month& operator-=(const years& __dy)  noexcept { this->__y -= __dy; return *this; }
-    inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok(); }
-};
-
-inline constexpr
-year_month operator/(const year& __y, const month& __m) noexcept { return year_month{__y, __m}; }
-
-inline constexpr
-year_month operator/(const year& __y, int __m) noexcept { return year_month{__y, month(__m)}; }
-
-inline constexpr
-bool operator==(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month(); }
-
-inline constexpr
-bool operator!=(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const year_month& __lhs, const year_month& __rhs) noexcept
-{ return __lhs.year() != __rhs.year() ? __lhs.year() < __rhs.year() : __lhs.month() < __rhs.month(); }
-
-inline constexpr
-bool operator> (const year_month& __lhs, const year_month& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-inline constexpr
-bool operator>=(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-constexpr year_month operator+(const year_month& __lhs, const months& __rhs) noexcept
-{
-    int __dmi = static_cast<int>(static_cast<unsigned>(__lhs.month())) - 1 + __rhs.count();
-    const int __dy = (__dmi >= 0 ? __dmi : __dmi-11) / 12;
-    __dmi = __dmi - __dy * 12 + 1;
-    return (__lhs.year() + years(__dy)) / month(static_cast<unsigned>(__dmi));
-}
-
-constexpr year_month operator+(const months& __lhs, const year_month& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-constexpr year_month operator+(const year_month& __lhs, const years& __rhs) noexcept
-{ return (__lhs.year() + __rhs) / __lhs.month(); }
-
-constexpr year_month operator+(const years& __lhs, const year_month& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-constexpr months     operator-(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return (__lhs.year() - __rhs.year()) + months(static_cast<unsigned>(__lhs.month()) - static_cast<unsigned>(__rhs.month())); }
-
-constexpr year_month operator-(const year_month& __lhs, const months& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-constexpr year_month operator-(const year_month& __lhs, const years& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-
-class _LIBCPP_TYPE_VIS year_month_day {
-private:
-    chrono::year  __y;
-    chrono::month __m;
-    chrono::day   __d;
-public:
-     year_month_day() = default;
-     inline constexpr year_month_day(
-            const chrono::year& __yval, const chrono::month& __mval, const chrono::day& __dval) noexcept
-            : __y{__yval}, __m{__mval}, __d{__dval} {}  
-//   inline constexpr year_month_day(const year_month_day_last& __ymdl) noexcept;
-//   inline constexpr year_month_day(const sys_days& dp) noexcept;
-//   inline explicit constexpr year_month_day(const local_days& dp) noexcept;
-            constexpr year_month_day& operator+=(const months& __dm) noexcept;
-            constexpr year_month_day& operator-=(const months& __dm) noexcept;
-            constexpr year_month_day& operator+=(const years& __dy)  noexcept;
-            constexpr year_month_day& operator-=(const years& __dy)  noexcept;
-     inline constexpr chrono::year  year()  const noexcept { return __y; }
-     inline constexpr chrono::month month() const noexcept { return __m; }
-     inline constexpr chrono::day   day()   const noexcept  { return __d; }
-//   inline constexpr operator            sys_days() const noexcept;
-//   inline explicit constexpr operator local_days() const noexcept;
-
-//   TODO: This is not quite correct; requires the calendar bits to do right
-//   d_ is in the range [1d, (y_/m_/last).day()],
-     inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __d.ok(); }
-};
-
-inline constexpr
-bool operator==(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day(); }
-
-inline constexpr
-bool operator!=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{
-    if (__lhs.year() < __rhs.year()) return true;
-    if (__lhs.year() > __rhs.year()) return false;
-    if (__lhs.month() < __rhs.month()) return true;
-    if (__lhs.month() > __rhs.month()) return false;
-    return __lhs.day() < __rhs.day();
-}
-
-inline constexpr
-bool operator> (const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-inline constexpr
-bool operator>=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-inline constexpr
-year_month_day operator/(const year_month& __lhs, const day& __rhs) noexcept
-{ return year_month_day{__lhs.year(), __lhs.month(), __rhs}; }
-
-inline constexpr
-year_month_day operator/(const year_month& __lhs, int __rhs) noexcept
-{ return __lhs / day(__rhs); }
-
-inline constexpr
-year_month_day operator/(const year& __lhs, const month_day& __rhs) noexcept
-{ return __lhs / __rhs.month() / __rhs.day(); }
-
-inline constexpr
-year_month_day operator/(int __lhs, const month_day& __rhs) noexcept
-{ return year(__lhs) / __rhs; }
-
-inline constexpr
-year_month_day operator/(const month_day& __lhs, const year& __rhs) noexcept
-{ return __rhs / __lhs; }
-
-inline constexpr
-year_month_day operator/(const month_day& __lhs, int __rhs) noexcept
-{ return year(__rhs) / __lhs; }
-
-
-inline constexpr
-year_month_day operator+(const year_month_day& __lhs, const months& __rhs) noexcept
-{ return (__lhs.year()/__lhs.month() + __rhs)/__lhs.day(); }
-
-inline constexpr
-year_month_day operator+(const months& __lhs, const year_month_day& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_day operator-(const year_month_day& __lhs, const months& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-inline constexpr
-year_month_day operator+(const year_month_day& __lhs, const years& __rhs) noexcept
-{ return (__lhs.year() + __rhs) / __lhs.month() / __lhs.day(); }
-
-inline constexpr
-year_month_day operator+(const years& __lhs, const year_month_day& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_day operator-(const year_month_day& __lhs, const years& __rhs) noexcept
-{ return __lhs + -__rhs; }
-
-inline constexpr year_month_day& year_month_day::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-inline constexpr year_month_day& year_month_day::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-inline constexpr year_month_day& year_month_day::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-inline constexpr year_month_day& year_month_day::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
-
-class _LIBCPP_TYPE_VIS year_month_day_last {
-private:
-    chrono::year           __y;
-    chrono::month_day_last __mdl;
-public:
-     constexpr year_month_day_last(const year& __yval, const month_day_last& __mdlval) noexcept
-        : __y{__yval}, __mdl{__mdlval} {}
-
-     constexpr year_month_day_last& operator+=(const months& __m) noexcept;
-     constexpr year_month_day_last& operator-=(const months& __m) noexcept;
-     constexpr year_month_day_last& operator+=(const years& __y)  noexcept;
-     constexpr year_month_day_last& operator-=(const years& __y)  noexcept;
-
-     constexpr chrono::year           year()           const noexcept { return __y; }
-     constexpr chrono::month          month()          const noexcept { return __mdl.month(); }
-     constexpr chrono::month_day_last month_day_last() const noexcept { return __mdl; }
-//   constexpr chrono::day            day()            const noexcept;
-//   constexpr          operator sys_days()   const noexcept;
-//   explicit constexpr operator local_days() const noexcept;
-     constexpr bool ok() const noexcept { return __y.ok() && __mdl.ok(); }
-};
-
-inline constexpr
-bool operator==(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
-{ return __lhs.year() == __rhs.year() && __lhs.month_day_last() == __rhs.month_day_last(); }
-
-inline constexpr
-bool operator!=(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-bool operator< (const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
-{
-    if (__lhs.year() < __rhs.year()) return true;
-    if (__lhs.year() > __rhs.year()) return false;
-    return __lhs.month_day_last() < __rhs.month_day_last();
-}
-
-inline constexpr
-bool operator> (const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-inline constexpr
-bool operator<=(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-inline constexpr
-bool operator>=(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-inline constexpr year_month_day_last operator/(const year_month& __lhs, last_spec) noexcept
-{ return year_month_day_last{__lhs.year(), month_day_last{__lhs.month()}}; }
-
-inline constexpr year_month_day_last operator/(const year& __lhs, const month_day_last& __rhs) noexcept
-{ return year_month_day_last{__lhs, __rhs}; }
-
-inline constexpr year_month_day_last operator/(int __lhs, const month_day_last& __rhs) noexcept
-{ return year_month_day_last{year{__lhs}, __rhs}; }
-
-inline constexpr year_month_day_last operator/(const month_day_last& __lhs, const year& __rhs) noexcept
-{ return __rhs / __lhs; }
-
-inline constexpr year_month_day_last operator/(const month_day_last& __lhs, int __rhs) noexcept
-{ return year{__rhs} / __lhs; }
-
-
-inline constexpr
-year_month_day_last operator+(const year_month_day_last& __lhs, const months& __rhs) noexcept
-{ return (__lhs.year() / __lhs.month() + __rhs) / last; }
-
-inline constexpr
-year_month_day_last operator+(const months& __lhs, const year_month_day_last& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_day_last operator-(const year_month_day_last& __lhs, const months& __rhs) noexcept
-{ return __lhs + (-__rhs); }
-
-inline constexpr
-year_month_day_last operator+(const year_month_day_last& __lhs, const years& __rhs) noexcept
-{ return year_month_day_last{__lhs.year() + __rhs, __lhs.month_day_last()}; }
-
-inline constexpr
-year_month_day_last operator+(const years& __lhs, const year_month_day_last& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_day_last operator-(const year_month_day_last& __lhs, const years& __rhs) noexcept
-{ return __lhs + (-__rhs); }
-
-inline constexpr year_month_day_last& year_month_day_last::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-inline constexpr year_month_day_last& year_month_day_last::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-inline constexpr year_month_day_last& year_month_day_last::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-inline constexpr year_month_day_last& year_month_day_last::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
-
-class _LIBCPP_TYPE_VIS year_month_weekday {
-    chrono::year            __y;
-    chrono::month           __m;
-    chrono::weekday_indexed __wdi;
-public:
-    year_month_weekday() = default;
-    constexpr year_month_weekday(const chrono::year& __yval, const chrono::month& __mval,
-                               const chrono::weekday_indexed& __wdival) noexcept
-        : __y{__yval}, __m{__mval}, __wdi{__wdival} {}
-//  constexpr year_month_weekday(const sys_days& dp) noexcept;
-//  explicit constexpr year_month_weekday(const local_days& dp) noexcept;
-    constexpr year_month_weekday& operator+=(const months& m) noexcept;
-    constexpr year_month_weekday& operator-=(const months& m) noexcept;
-    constexpr year_month_weekday& operator+=(const years& y)  noexcept;
-    constexpr year_month_weekday& operator-=(const years& y)  noexcept;
-
-    inline constexpr chrono::year                       year() const noexcept { return __y; }
-    inline constexpr chrono::month                     month() const noexcept { return __m; }
-    inline constexpr chrono::weekday                 weekday() const noexcept { return __wdi.weekday(); }
-    inline constexpr unsigned                          index() const noexcept { return __wdi.index(); }
-    inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
-
-//  constexpr          operator sys_days()   const noexcept;
-//  explicit constexpr operator local_days() const noexcept;
-    inline constexpr bool ok() const noexcept
-    {
-        if (!__y.ok() || !__m.ok() || !__wdi.ok()) return false;
-    //  TODO: make sure it's a valid date
-        return true;
-    }
-};
-
-inline constexpr
-bool operator==(const year_month_weekday& __lhs, const year_month_weekday& __rhs) noexcept
-{ return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.weekday_indexed() == __rhs.weekday_indexed(); }
-
-inline constexpr
-bool operator!=(const year_month_weekday& __lhs, const year_month_weekday& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-inline constexpr
-year_month_weekday operator/(const year_month& __lhs, const weekday_indexed& __rhs) noexcept
-{ return year_month_weekday{__lhs.year(), __lhs.month(), __rhs}; }
-
-inline constexpr
-year_month_weekday operator/(const year& __lhs, const month_weekday& __rhs) noexcept
-{ return year_month_weekday{__lhs, __rhs.month(), __rhs.weekday_indexed()}; }
-
-inline constexpr
-year_month_weekday operator/(int __lhs, const month_weekday& __rhs) noexcept
-{ return year(__lhs) / __rhs; }
-
-inline constexpr
-year_month_weekday operator/(const month_weekday& __lhs, const year& __rhs) noexcept
-{ return __rhs / __lhs; }
-
-inline constexpr
-year_month_weekday operator/(const month_weekday& __lhs, int __rhs) noexcept
-{ return year(__rhs) / __lhs; }
-
-
-inline constexpr
-year_month_weekday operator+(const year_month_weekday& __lhs, const months& __rhs) noexcept
-{ return (__lhs.year() / __lhs.month() + __rhs) / __lhs.weekday_indexed(); }
-
-inline constexpr
-year_month_weekday operator+(const months& __lhs, const year_month_weekday& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_weekday operator-(const year_month_weekday& __lhs, const months& __rhs) noexcept
-{ return __lhs + (-__rhs); }
-
-inline constexpr
-year_month_weekday operator+(const year_month_weekday& __lhs, const years& __rhs) noexcept
-{ return year_month_weekday{__lhs.year() + __rhs, __lhs.month(), __lhs.weekday_indexed()}; }
-
-inline constexpr
-year_month_weekday operator+(const years& __lhs, const year_month_weekday& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_weekday operator-(const year_month_weekday& __lhs, const years& __rhs) noexcept
-{ return __lhs + (-__rhs); }
-
-
-inline constexpr year_month_weekday& year_month_weekday::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-inline constexpr year_month_weekday& year_month_weekday::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-inline constexpr year_month_weekday& year_month_weekday::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-inline constexpr year_month_weekday& year_month_weekday::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
-
-class _LIBCPP_TYPE_VIS year_month_weekday_last {
-private:
-    chrono::year         __y;
-    chrono::month        __m;
-    chrono::weekday_last __wdl;
-public:
-    constexpr year_month_weekday_last(const chrono::year& __yval, const chrono::month& __mval,
-                                      const chrono::weekday_last& __wdlval) noexcept
-                : __y{__yval}, __m{__mval}, __wdl{__wdlval} {}
-    constexpr year_month_weekday_last& operator+=(const months& __dm) noexcept;
-    constexpr year_month_weekday_last& operator-=(const months& __dm) noexcept;
-    constexpr year_month_weekday_last& operator+=(const years& __dy)  noexcept;
-    constexpr year_month_weekday_last& operator-=(const years& __dy)  noexcept;
-
-    inline constexpr chrono::year                 year() const noexcept { return __y; }
-    inline constexpr chrono::month               month() const noexcept { return __m; }
-    inline constexpr chrono::weekday           weekday() const noexcept { return __wdl.weekday(); }
-    inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
-//  constexpr          operator sys_days()   const noexcept;
-//  explicit constexpr operator local_days() const noexcept;
-    inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __wdl.ok(); }
-};
-
-inline constexpr
-bool operator==(const year_month_weekday_last& __lhs, const year_month_weekday_last& __rhs) noexcept
-{ return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.weekday_last() == __rhs.weekday_last(); }
-
-inline constexpr
-bool operator!=(const year_month_weekday_last& __lhs, const year_month_weekday_last& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-
-inline constexpr
-year_month_weekday_last operator/(const year_month& __lhs, const weekday_last& __rhs) noexcept
-{ return year_month_weekday_last{__lhs.year(), __lhs.month(), __rhs}; }
-
-inline constexpr
-year_month_weekday_last operator/(const year& __lhs, const month_weekday_last& __rhs) noexcept
-{ return year_month_weekday_last{__lhs, __rhs.month(), __rhs.weekday_last()}; }
-
-inline constexpr
-year_month_weekday_last operator/(int __lhs, const month_weekday_last& __rhs) noexcept
-{ return year(__lhs) / __rhs; }
-
-inline constexpr
-year_month_weekday_last operator/(const month_weekday_last& __lhs, const year& __rhs) noexcept
-{ return __rhs / __lhs; }
-
-inline constexpr
-year_month_weekday_last operator/(const month_weekday_last& __lhs, int __rhs) noexcept
-{ return year(__rhs) / __lhs; }  
-
-
-inline constexpr
-year_month_weekday_last operator+(const year_month_weekday_last& __lhs, const months& __rhs) noexcept
-{ return (__lhs.year() / __lhs.month() + __rhs) / __lhs.weekday_last(); }
-
-inline constexpr
-year_month_weekday_last operator+(const months& __lhs, const year_month_weekday_last& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_weekday_last operator-(const year_month_weekday_last& __lhs, const months& __rhs) noexcept
-{ return __lhs + (-__rhs); }
-
-inline constexpr
-year_month_weekday_last operator+(const year_month_weekday_last& __lhs, const years& __rhs) noexcept
-{ return year_month_weekday_last{__lhs.year() + __rhs, __lhs.month(), __lhs.weekday_last()}; }
-
-inline constexpr
-year_month_weekday_last operator+(const years& __lhs, const year_month_weekday_last& __rhs) noexcept
-{ return __rhs + __lhs; }
-
-inline constexpr
-year_month_weekday_last operator-(const year_month_weekday_last& __lhs, const years& __rhs) noexcept
-{ return __lhs + (-__rhs); }
-
-inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-inline constexpr year_month_weekday_last& year_month_weekday_last::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-inline constexpr year_month_weekday_last& year_month_weekday_last::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
-
-#endif // _LIBCPP_STD_VER > 17
 } // chrono
 
 #if _LIBCPP_STD_VER > 11
@@ -2668,17 +1648,6 @@ inline namespace literals
         return chrono::duration<long double, nano> (__ns);
     }
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_CHRONO_LITERALS)
-    constexpr chrono::day operator ""d(unsigned long long __d) noexcept
-    {
-        return chrono::day(static_cast<unsigned>(__d));
-    }
- 
-    constexpr chrono::year operator ""y(unsigned long long __y) noexcept
-    {
-        return chrono::year(static_cast<int>(__y));
-    }
-#endif
 }}
 
 namespace chrono { // hoist the literals into namespace std::chrono

Removed: libcxx/trunk/test/std/utilities/time/days.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/days.pass.cpp?rev=344579&view=auto
==============================================================================
--- libcxx/trunk/test/std/utilities/time/days.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/days.pass.cpp (removed)
@@ -1,28 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03, c++11, c++14, c++17
-
-// <chrono>
-
-// using days = duration<signed integer type of at least 25 bits, ratio_multiply<ratio<24>, hours::period>>;
-
-#include <chrono>
-#include <type_traits>
-#include <limits>
-
-int main()
-{
-    typedef std::chrono::days D;
-    typedef D::rep Rep;
-    typedef D::period Period;
-    static_assert(std::is_signed<Rep>::value, "");
-    static_assert(std::is_integral<Rep>::value, "");
-    static_assert(std::numeric_limits<Rep>::digits >= 25, "");
-    static_assert(std::is_same_v<Period, std::ratio_multiply<std::ratio<24>, std::chrono::hours::period>>, "");
-}

Removed: libcxx/trunk/test/std/utilities/time/months.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/months.pass.cpp?rev=344579&view=auto
==============================================================================
--- libcxx/trunk/test/std/utilities/time/months.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/months.pass.cpp (removed)
@@ -1,29 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03, c++11, c++14, c++17
-
-// <chrono>
-
-// using months = duration<signed integer type of at least 20 bits, ratio_divide<years::period, ratio<12>>>;
-
-
-#include <chrono>
-#include <type_traits>
-#include <limits>
-
-int main()
-{
-    typedef std::chrono::months D;
-    typedef D::rep Rep;
-    typedef D::period Period;
-    static_assert(std::is_signed<Rep>::value, "");
-    static_assert(std::is_integral<Rep>::value, "");
-    static_assert(std::numeric_limits<Rep>::digits >= 20, "");
-    static_assert(std::is_same_v<Period, std::ratio_divide<std::chrono::years::period, std::ratio<12>>>, "");
-}

Modified: libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp?rev=344580&r1=344579&r2=344580&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp Mon Oct 15 19:40:42 2018
@@ -14,8 +14,6 @@
 #include <type_traits>
 #include <cassert>
 
-#include "test_macros.h"
-
 int main()
 {
     using namespace std::literals::chrono_literals;
@@ -27,31 +25,6 @@ int main()
     static_assert ( std::is_same<decltype( 3ms  ), std::chrono::milliseconds>::value, "" );
     static_assert ( std::is_same<decltype( 3us  ), std::chrono::microseconds>::value, "" );
     static_assert ( std::is_same<decltype( 3ns  ), std::chrono::nanoseconds>::value, "" );
-#if TEST_STD_VER > 17
-//     static_assert ( std::is_same<decltype( Sunday ),    std::chrono::weekday>::value, "" );
-//     static_assert ( std::is_same<decltype( Monday ),    std::chrono::weekday>::value, "" );
-//     static_assert ( std::is_same<decltype( Tuesday ),   std::chrono::weekday>::value, "" );
-//     static_assert ( std::is_same<decltype( Wednesday ), std::chrono::weekday>::value, "" );
-//     static_assert ( std::is_same<decltype( Thursday ),  std::chrono::weekday>::value, "" );
-//     static_assert ( std::is_same<decltype( Friday ),    std::chrono::weekday>::value, "" );
-//     static_assert ( std::is_same<decltype( Saturday ),  std::chrono::weekday>::value, "" );
-// 
-//     static_assert ( std::is_same<decltype( January ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( February ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( March ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( April ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( May ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( June ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( July ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( August ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( September ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( October ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( November ), std::chrono::month>::value, "" );
-//     static_assert ( std::is_same<decltype( December ), std::chrono::month>::value, "" );
-
-//     static_assert ( std::is_same<decltype( 4d    ), std::chrono::days>::value, "" );
-//     static_assert ( std::is_same<decltype( 2016y ), std::chrono::years>::value, "" );
-#endif
 
     std::chrono::hours h = 4h;
     assert ( h == std::chrono::hours(4));
@@ -82,32 +55,4 @@ int main()
     assert ( ns == std::chrono::nanoseconds(645));
     auto ns2 = 645.ns;
     assert ( ns == ns2 );
-
-
-#if TEST_STD_VER > 17
-//  assert(std::chrono::Sunday    == std::chrono::weekday(0));
-//  assert(std::chrono::Monday    == std::chrono::weekday(1));
-//  assert(std::chrono::Tuesday   == std::chrono::weekday(2));
-//  assert(std::chrono::Wednesday == std::chrono::weekday(3));
-//  assert(std::chrono::Thursday  == std::chrono::weekday(4));
-//  assert(std::chrono::Friday    == std::chrono::weekday(5));
-//  assert(std::chrono::Saturday  == std::chrono::weekday(6));
-
-	assert(std::chrono::January   == std::chrono::month(1));
-	assert(std::chrono::February  == std::chrono::month(2));
-	assert(std::chrono::March     == std::chrono::month(3));
-	assert(std::chrono::April     == std::chrono::month(4));
-	assert(std::chrono::May       == std::chrono::month(5));
-	assert(std::chrono::June      == std::chrono::month(6));
-	assert(std::chrono::July      == std::chrono::month(7));
-	assert(std::chrono::August    == std::chrono::month(8));
-	assert(std::chrono::September == std::chrono::month(9));
-	assert(std::chrono::October   == std::chrono::month(10));
-	assert(std::chrono::November  == std::chrono::month(11));
-	assert(std::chrono::December  == std::chrono::month(12));
-
-    std::chrono::year y1 = 2018y;
-    assert (y1 == std::chrono::year(2018));
-//  No conversion from floating point for years
-#endif
 }

Modified: libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp?rev=344580&r1=344579&r2=344580&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp Mon Oct 15 19:40:42 2018
@@ -45,31 +45,4 @@ int main()
     assert ( ns == nanoseconds(645));
     auto ns2 = 645.ns;
     assert ( ns == ns2 );
-
-#if TEST_STD_VER > 17
-    assert(Sunday    == weekday(0));
-    assert(Monday    == weekday(1));
-    assert(Tuesday   == weekday(2));
-    assert(Wednesday == weekday(3));
-    assert(Thursday  == weekday(4));
-    assert(Friday    == weekday(5));
-    assert(Saturday  == weekday(6));
-
-    assert(January   == month(1));
-    assert(February  == month(2));
-    assert(March     == month(3));
-    assert(April     == month(4));
-    assert(May       == month(5));
-    assert(June      == month(6));
-    assert(July      == month(7));
-    assert(August    == month(8));
-    assert(September == month(9));
-    assert(October   == month(10));
-    assert(November  == month(11));
-    assert(December  == month(12));
-
-    year y1 = 2018y;
-    assert (y1 == year(2018));
-//  No conversion from floating point for years
-#endif
 }

Modified: libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp?rev=344580&r1=344579&r2=344580&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.duration/time.duration.literals/literals2.pass.cpp Mon Oct 15 19:40:42 2018
@@ -47,10 +47,4 @@ int main()
     assert ( ns == std::chrono::nanoseconds(645));
     auto ns2 = 645.ns;
     assert ( ns == ns2 );
-
-#if TEST_STD_VER > 17
-    std::chrono::year y1 = 2018y;
-    assert (y1 == std::chrono::year(2018));
-//  No conversion from floating point for years
-#endif
 }

Removed: libcxx/trunk/test/std/utilities/time/weeks.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/weeks.pass.cpp?rev=344579&view=auto
==============================================================================
--- libcxx/trunk/test/std/utilities/time/weeks.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/weeks.pass.cpp (removed)
@@ -1,28 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03, c++11, c++14, c++17
-
-// <chrono>
-
-// using weeks = duration<signed integer type of at least 22 bits, ratio_multiply<ratio<7>, days::period>>;
-
-#include <chrono>
-#include <type_traits>
-#include <limits>
-
-int main()
-{
-    typedef std::chrono::weeks D;
-    typedef D::rep Rep;
-    typedef D::period Period;
-    static_assert(std::is_signed<Rep>::value, "");
-    static_assert(std::is_integral<Rep>::value, "");
-    static_assert(std::numeric_limits<Rep>::digits >= 22, "");
-    static_assert(std::is_same_v<Period, std::ratio_multiply<std::ratio<7>, std::chrono::days::period>>, "");
-}

Removed: libcxx/trunk/test/std/utilities/time/years.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/years.pass.cpp?rev=344579&view=auto
==============================================================================
--- libcxx/trunk/test/std/utilities/time/years.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/years.pass.cpp (removed)
@@ -1,28 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03, c++11, c++14, c++17
-
-// <chrono>
-
-// using years = duration<signed integer type of at least 17 bits, ratio_multiply<ratio<146097, 400>, days::period>>
-
-#include <chrono>
-#include <type_traits>
-#include <limits>
-
-int main()
-{
-    typedef std::chrono::years D;
-    typedef D::rep Rep;
-    typedef D::period Period;
-    static_assert(std::is_signed<Rep>::value, "");
-    static_assert(std::is_integral<Rep>::value, "");
-    static_assert(std::numeric_limits<Rep>::digits >= 17, "");
-    static_assert(std::is_same_v<Period, std::ratio_multiply<std::ratio<146097, 400>, std::chrono::days::period>>, "");
-}

Modified: libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp?rev=344580&r1=344579&r2=344580&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp Mon Oct 15 19:40:42 2018
@@ -34,13 +34,11 @@
 #include "variant_test_helpers.hpp"
 
 int main() {
-#if TEST_STD_VER == 17
-  { // This test does not pass on C++20 or later; see https://bugs.llvm.org/show_bug.cgi?id=39232
+  {
     using V = std::variant<int, ConstexprTestTypes::NoCtors>;
     constexpr V v;
     static_assert(v.index() == 0, "");
   }
-#endif
   {
     using V = std::variant<int, long>;
     constexpr V v(std::in_place_index<1>);

Modified: libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp?rev=344580&r1=344579&r2=344580&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp Mon Oct 15 19:40:42 2018
@@ -34,13 +34,11 @@
 #include "variant_test_helpers.hpp"
 
 int main() {
-#if TEST_STD_VER == 17
-  { // This test does not pass on C++20 or later; see https://bugs.llvm.org/show_bug.cgi?id=39232
+  {
     using V = std::variant<int, ConstexprTestTypes::NoCtors>;
     constexpr V v;
     static_assert(!v.valueless_by_exception(), "");
   }
-#endif
   {
     using V = std::variant<int, long, std::string>;
     const V v("abc");




More information about the libcxx-commits mailing list