constexpr more stuff and clean up whitespace

This commit is contained in:
Howard Hinnant
2016-05-30 22:09:21 -04:00
parent 76bef1fe01
commit ea2d0d3357
86 changed files with 679 additions and 655 deletions

162
date.h
View File

@@ -2,19 +2,19 @@
#define DATE_H
// The MIT License (MIT)
//
//
// Copyright (c) 2015, 2016 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -223,13 +223,13 @@ class day
public:
explicit CONSTCD11 day(unsigned d) NOEXCEPT;
day& operator++() NOEXCEPT;
day operator++(int) NOEXCEPT;
day& operator--() NOEXCEPT;
day operator--(int) NOEXCEPT;
CONSTCD14 day& operator++() NOEXCEPT;
CONSTCD14 day operator++(int) NOEXCEPT;
CONSTCD14 day& operator--() NOEXCEPT;
CONSTCD14 day operator--(int) NOEXCEPT;
day& operator+=(const days& d) NOEXCEPT;
day& operator-=(const days& d) NOEXCEPT;
CONSTCD14 day& operator+=(const days& d) NOEXCEPT;
CONSTCD14 day& operator-=(const days& d) NOEXCEPT;
CONSTCD11 explicit operator unsigned() const NOEXCEPT;
CONSTCD11 bool ok() const NOEXCEPT;
@@ -260,13 +260,13 @@ class month
public:
explicit CONSTCD11 month(unsigned m) NOEXCEPT;
month& operator++() NOEXCEPT;
month operator++(int) NOEXCEPT;
month& operator--() NOEXCEPT;
month operator--(int) NOEXCEPT;
CONSTCD14 month& operator++() NOEXCEPT;
CONSTCD14 month operator++(int) NOEXCEPT;
CONSTCD14 month& operator--() NOEXCEPT;
CONSTCD14 month operator--(int) NOEXCEPT;
month& operator+=(const months& m) NOEXCEPT;
month& operator-=(const months& m) NOEXCEPT;
CONSTCD14 month& operator+=(const months& m) NOEXCEPT;
CONSTCD14 month& operator-=(const months& m) NOEXCEPT;
CONSTCD11 explicit operator unsigned() const NOEXCEPT;
CONSTCD11 bool ok() const NOEXCEPT;
@@ -297,13 +297,13 @@ class year
public:
explicit CONSTCD11 year(int y) NOEXCEPT;
year& operator++() NOEXCEPT;
year operator++(int) NOEXCEPT;
year& operator--() NOEXCEPT;
year operator--(int) NOEXCEPT;
CONSTCD14 year& operator++() NOEXCEPT;
CONSTCD14 year operator++(int) NOEXCEPT;
CONSTCD14 year& operator--() NOEXCEPT;
CONSTCD14 year operator--(int) NOEXCEPT;
year& operator+=(const years& y) NOEXCEPT;
year& operator-=(const years& y) NOEXCEPT;
CONSTCD14 year& operator+=(const years& y) NOEXCEPT;
CONSTCD14 year& operator-=(const years& y) NOEXCEPT;
CONSTCD11 bool is_leap() const NOEXCEPT;
@@ -341,13 +341,13 @@ public:
CONSTCD11 weekday(const sys_days& dp) NOEXCEPT;
CONSTCD11 explicit weekday(const local_days& dp) NOEXCEPT;
weekday& operator++() NOEXCEPT;
weekday operator++(int) NOEXCEPT;
weekday& operator--() NOEXCEPT;
weekday operator--(int) NOEXCEPT;
CONSTCD14 weekday& operator++() NOEXCEPT;
CONSTCD14 weekday operator++(int) NOEXCEPT;
CONSTCD14 weekday& operator--() NOEXCEPT;
CONSTCD14 weekday operator--(int) NOEXCEPT;
weekday& operator+=(const days& d) NOEXCEPT;
weekday& operator-=(const days& d) NOEXCEPT;
CONSTCD14 weekday& operator+=(const days& d) NOEXCEPT;
CONSTCD14 weekday& operator-=(const days& d) NOEXCEPT;
CONSTCD11 explicit operator unsigned() const NOEXCEPT;
CONSTCD11 bool ok() const NOEXCEPT;
@@ -426,10 +426,10 @@ public:
CONSTCD11 date::year year() const NOEXCEPT;
CONSTCD11 date::month month() const NOEXCEPT;
year_month& operator+=(const months& dm) NOEXCEPT;
year_month& operator-=(const months& dm) NOEXCEPT;
year_month& operator+=(const years& dy) NOEXCEPT;
year_month& operator-=(const years& dy) NOEXCEPT;
CONSTCD14 year_month& operator+=(const months& dm) NOEXCEPT;
CONSTCD14 year_month& operator-=(const months& dm) NOEXCEPT;
CONSTCD14 year_month& operator+=(const years& dy) NOEXCEPT;
CONSTCD14 year_month& operator-=(const years& dy) NOEXCEPT;
CONSTCD11 bool ok() const NOEXCEPT;
};
@@ -570,10 +570,10 @@ public:
CONSTCD14 year_month_day(sys_days dp) NOEXCEPT;
CONSTCD14 explicit year_month_day(local_days dp) NOEXCEPT;
year_month_day& operator+=(const months& m) NOEXCEPT;
year_month_day& operator-=(const months& m) NOEXCEPT;
year_month_day& operator+=(const years& y) NOEXCEPT;
year_month_day& operator-=(const years& y) NOEXCEPT;
CONSTCD14 year_month_day& operator+=(const months& m) NOEXCEPT;
CONSTCD14 year_month_day& operator-=(const months& m) NOEXCEPT;
CONSTCD14 year_month_day& operator+=(const years& y) NOEXCEPT;
CONSTCD14 year_month_day& operator-=(const years& y) NOEXCEPT;
CONSTCD11 date::year year() const NOEXCEPT;
CONSTCD11 date::month month() const NOEXCEPT;
@@ -617,10 +617,10 @@ public:
CONSTCD11 year_month_day_last(const date::year& y,
const date::month_day_last& mdl) NOEXCEPT;
year_month_day_last& operator+=(const months& m) NOEXCEPT;
year_month_day_last& operator-=(const months& m) NOEXCEPT;
year_month_day_last& operator+=(const years& y) NOEXCEPT;
year_month_day_last& operator-=(const years& y) NOEXCEPT;
CONSTCD14 year_month_day_last& operator+=(const months& m) NOEXCEPT;
CONSTCD14 year_month_day_last& operator-=(const months& m) NOEXCEPT;
CONSTCD14 year_month_day_last& operator+=(const years& y) NOEXCEPT;
CONSTCD14 year_month_day_last& operator-=(const years& y) NOEXCEPT;
CONSTCD11 date::year year() const NOEXCEPT;
CONSTCD11 date::month month() const NOEXCEPT;
@@ -687,10 +687,10 @@ public:
CONSTCD14 year_month_weekday(const sys_days& dp) NOEXCEPT;
CONSTCD14 explicit year_month_weekday(const local_days& dp) NOEXCEPT;
year_month_weekday& operator+=(const months& m) NOEXCEPT;
year_month_weekday& operator-=(const months& m) NOEXCEPT;
year_month_weekday& operator+=(const years& y) NOEXCEPT;
year_month_weekday& operator-=(const years& y) NOEXCEPT;
CONSTCD14 year_month_weekday& operator+=(const months& m) NOEXCEPT;
CONSTCD14 year_month_weekday& operator-=(const months& m) NOEXCEPT;
CONSTCD14 year_month_weekday& operator+=(const years& y) NOEXCEPT;
CONSTCD14 year_month_weekday& operator-=(const years& y) NOEXCEPT;
CONSTCD11 date::year year() const NOEXCEPT;
CONSTCD11 date::month month() const NOEXCEPT;
@@ -752,10 +752,10 @@ public:
CONSTCD11 year_month_weekday_last(const date::year& y, const date::month& m,
const date::weekday_last& wdl) NOEXCEPT;
year_month_weekday_last& operator+=(const months& m) NOEXCEPT;
year_month_weekday_last& operator-=(const months& m) NOEXCEPT;
year_month_weekday_last& operator+=(const years& y) NOEXCEPT;
year_month_weekday_last& operator-=(const years& y) NOEXCEPT;
CONSTCD14 year_month_weekday_last& operator+=(const months& m) NOEXCEPT;
CONSTCD14 year_month_weekday_last& operator-=(const months& m) NOEXCEPT;
CONSTCD14 year_month_weekday_last& operator+=(const years& y) NOEXCEPT;
CONSTCD14 year_month_weekday_last& operator-=(const years& y) NOEXCEPT;
CONSTCD11 date::year year() const NOEXCEPT;
CONSTCD11 date::month month() const NOEXCEPT;
@@ -825,7 +825,7 @@ CONSTCD11 date::year operator "" _y(unsigned long long y) NOEXCEPT;
// CONSTDATA date::month oct{10};
// CONSTDATA date::month nov{11};
// CONSTDATA date::month dec{12};
//
//
// CONSTDATA date::weekday sun{0u};
// CONSTDATA date::weekday mon{1u};
// CONSTDATA date::weekday tue{2u};
@@ -1074,12 +1074,12 @@ trunc(const std::chrono::time_point<Clock, FromDuration>& tp)
// day
CONSTCD11 inline day::day(unsigned d) NOEXCEPT : d_(static_cast<unsigned char>(d)) {}
inline day& day::operator++() NOEXCEPT {++d_; return *this;}
inline day day::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
inline day& day::operator--() NOEXCEPT {--d_; return *this;}
inline day day::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
inline day& day::operator+=(const days& d) NOEXCEPT {*this = *this + d; return *this;}
inline day& day::operator-=(const days& d) NOEXCEPT {*this = *this - d; return *this;}
CONSTCD14 inline day& day::operator++() NOEXCEPT {++d_; return *this;}
CONSTCD14 inline day day::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
CONSTCD14 inline day& day::operator--() NOEXCEPT {--d_; return *this;}
CONSTCD14 inline day day::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
CONSTCD14 inline day& day::operator+=(const days& d) NOEXCEPT {*this = *this + d; return *this;}
CONSTCD14 inline day& day::operator-=(const days& d) NOEXCEPT {*this = *this - d; return *this;}
CONSTCD11 inline day::operator unsigned() const NOEXCEPT {return d_;}
CONSTCD11 inline bool day::ok() const NOEXCEPT {return 1 <= d_ && d_ <= 31;}
@@ -1180,11 +1180,12 @@ operator<<(std::basic_ostream<CharT, Traits>& os, const day& d)
// month
CONSTCD11 inline month::month(unsigned m) NOEXCEPT : m_(static_cast<decltype(m_)>(m)) {}
inline month& month::operator++() NOEXCEPT {if (++m_ == 13) m_ = 1; return *this;}
inline month month::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
inline month& month::operator--() NOEXCEPT {if (--m_ == 0) m_ = 12; return *this;}
inline month month::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
CONSTCD14 inline month& month::operator++() NOEXCEPT {if (++m_ == 13) m_ = 1; return *this;}
CONSTCD14 inline month month::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
CONSTCD14 inline month& month::operator--() NOEXCEPT {if (--m_ == 0) m_ = 12; return *this;}
CONSTCD14 inline month month::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
CONSTCD14
inline
month&
month::operator+=(const months& m) NOEXCEPT
@@ -1193,6 +1194,7 @@ month::operator+=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
month&
month::operator-=(const months& m) NOEXCEPT
@@ -1340,12 +1342,12 @@ operator<<(std::basic_ostream<CharT, Traits>& os, const month& m)
// year
CONSTCD11 inline year::year(int y) NOEXCEPT : y_(static_cast<decltype(y_)>(y)) {}
inline year& year::operator++() NOEXCEPT {++y_; return *this;}
inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
inline year& year::operator--() NOEXCEPT {--y_; return *this;}
inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;}
inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;}
CONSTCD14 inline year& year::operator++() NOEXCEPT {++y_; return *this;}
CONSTCD14 inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
CONSTCD14 inline year& year::operator--() NOEXCEPT {--y_; return *this;}
CONSTCD14 inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
CONSTCD14 inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;}
CONSTCD14 inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;}
CONSTCD11
inline
@@ -1496,11 +1498,12 @@ weekday::weekday(const local_days& dp) NOEXCEPT
: wd_(weekday_from_days(dp.time_since_epoch().count()))
{}
inline weekday& weekday::operator++() NOEXCEPT {if (++wd_ == 7) wd_ = 0; return *this;}
inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
inline weekday& weekday::operator--() NOEXCEPT {if (wd_-- == 0) wd_ = 6; return *this;}
inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
CONSTCD14 inline weekday& weekday::operator++() NOEXCEPT {if (++wd_ == 7) wd_ = 0; return *this;}
CONSTCD14 inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
CONSTCD14 inline weekday& weekday::operator--() NOEXCEPT {if (wd_-- == 0) wd_ = 6; return *this;}
CONSTCD14 inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
CONSTCD14
inline
weekday&
weekday::operator+=(const days& d) NOEXCEPT
@@ -1509,6 +1512,7 @@ weekday::operator+=(const days& d) NOEXCEPT
return *this;
}
CONSTCD14
inline
weekday&
weekday::operator-=(const days& d) NOEXCEPT
@@ -1770,6 +1774,7 @@ CONSTCD11 inline year year_month::year() const NOEXCEPT {return y_;}
CONSTCD11 inline month year_month::month() const NOEXCEPT {return m_;}
CONSTCD11 inline bool year_month::ok() const NOEXCEPT {return y_.ok() && m_.ok();}
CONSTCD14
inline
year_month&
year_month::operator+=(const months& dm) NOEXCEPT
@@ -1778,6 +1783,7 @@ year_month::operator+=(const months& dm) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month&
year_month::operator-=(const months& dm) NOEXCEPT
@@ -1786,6 +1792,7 @@ year_month::operator-=(const months& dm) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month&
year_month::operator+=(const years& dy) NOEXCEPT
@@ -1794,6 +1801,7 @@ year_month::operator+=(const years& dy) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month&
year_month::operator-=(const years& dy) NOEXCEPT
@@ -2181,6 +2189,7 @@ year_month_day_last::year_month_day_last(const date::year& y,
, mdl_(mdl)
{}
CONSTCD14
inline
year_month_day_last&
year_month_day_last::operator+=(const months& m) NOEXCEPT
@@ -2189,6 +2198,7 @@ year_month_day_last::operator+=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_day_last&
year_month_day_last::operator-=(const months& m) NOEXCEPT
@@ -2197,6 +2207,7 @@ year_month_day_last::operator-=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_day_last&
year_month_day_last::operator+=(const years& y) NOEXCEPT
@@ -2205,6 +2216,7 @@ year_month_day_last::operator+=(const years& y) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_day_last&
year_month_day_last::operator-=(const years& y) NOEXCEPT
@@ -2403,6 +2415,7 @@ CONSTCD11 inline year year_month_day::year() const NOEXCEPT {return y_;}
CONSTCD11 inline month year_month_day::month() const NOEXCEPT {return m_;}
CONSTCD11 inline day year_month_day::day() const NOEXCEPT {return d_;}
CONSTCD14
inline
year_month_day&
year_month_day::operator+=(const months& m) NOEXCEPT
@@ -2411,6 +2424,7 @@ year_month_day::operator+=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_day&
year_month_day::operator-=(const months& m) NOEXCEPT
@@ -2419,6 +2433,7 @@ year_month_day::operator-=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_day&
year_month_day::operator+=(const years& y) NOEXCEPT
@@ -2427,6 +2442,7 @@ year_month_day::operator+=(const years& y) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_day&
year_month_day::operator-=(const years& y) NOEXCEPT
@@ -2638,6 +2654,7 @@ year_month_weekday::year_month_weekday(const local_days& dp) NOEXCEPT
: year_month_weekday(from_days(dp.time_since_epoch()))
{}
CONSTCD14
inline
year_month_weekday&
year_month_weekday::operator+=(const months& m) NOEXCEPT
@@ -2646,6 +2663,7 @@ year_month_weekday::operator+=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_weekday&
year_month_weekday::operator-=(const months& m) NOEXCEPT
@@ -2654,6 +2672,7 @@ year_month_weekday::operator-=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_weekday&
year_month_weekday::operator+=(const years& y) NOEXCEPT
@@ -2662,6 +2681,7 @@ year_month_weekday::operator+=(const years& y) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_weekday&
year_month_weekday::operator-=(const years& y) NOEXCEPT
@@ -2831,6 +2851,7 @@ year_month_weekday_last::year_month_weekday_last(const date::year& y,
, wdl_(wdl)
{}
CONSTCD14
inline
year_month_weekday_last&
year_month_weekday_last::operator+=(const months& m) NOEXCEPT
@@ -2839,6 +2860,7 @@ year_month_weekday_last::operator+=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_weekday_last&
year_month_weekday_last::operator-=(const months& m) NOEXCEPT
@@ -2847,6 +2869,7 @@ year_month_weekday_last::operator-=(const months& m) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_weekday_last&
year_month_weekday_last::operator+=(const years& y) NOEXCEPT
@@ -2855,6 +2878,7 @@ year_month_weekday_last::operator+=(const years& y) NOEXCEPT
return *this;
}
CONSTCD14
inline
year_month_weekday_last&
year_month_weekday_last::operator-=(const years& y) NOEXCEPT

View File

@@ -2,19 +2,19 @@
#define ISO_WEEK_H
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -126,7 +126,7 @@ CONSTCD14 weekday operator-(const weekday& x, const days& y) NOEXCEPT;
CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT;
template<class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd);
// year

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,31 +25,31 @@
// unsigned char d_;
// public:
// explicit constexpr day(unsigned d) noexcept;
//
//
// day& operator++() noexcept;
// day operator++(int) noexcept;
// day& operator--() noexcept;
// day operator--(int) noexcept;
//
//
// day& operator+=(const days& d) noexcept;
// day& operator-=(const days& d) noexcept;
//
//
// constexpr explicit operator unsigned() const noexcept;
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const day& x, const day& y) noexcept;
// constexpr bool operator!=(const day& x, const day& y) noexcept;
// constexpr bool operator< (const day& x, const day& y) noexcept;
// constexpr bool operator> (const day& x, const day& y) noexcept;
// constexpr bool operator<=(const day& x, const day& y) noexcept;
// constexpr bool operator>=(const day& x, const day& y) noexcept;
//
//
// constexpr day operator+(const day& x, const days& y) noexcept;
// constexpr day operator+(const days& x, const day& y) noexcept;
// constexpr day operator-(const day& x, const days& y) noexcept;
// constexpr days operator-(const day& x, const day& y) noexcept;
//
//
// constexpr day operator "" _d(unsigned long long d) noexcept;
// std::ostream& operator<<(std::ostream& os, const day& d);

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,21 +21,21 @@
// SOFTWARE.
// durations
//
//
// using days = std::chrono::duration
// <int, std::ratio_multiply<std::ratio<24>, std::chrono::hours::period>>;
//
//
// using weeks = std::chrono::duration
// <int, std::ratio_multiply<std::ratio<7>, days::period>>;
//
//
// using years = std::chrono::duration
// <int, std::ratio_multiply<std::ratio<146097, 400>, days::period>>;
//
//
// using months = std::chrono::duration
// <int, std::ratio_divide<years::period, std::ratio<12>>>;
//
//
// time_point
//
//
// using sys_days = std::chrono::time_point<std::chrono::system_clock, days>;
#include "date.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,31 +25,31 @@
// unsigned char m_;
// public:
// explicit constexpr month(unsigned m) noexcept;
//
//
// month& operator++() noexcept;
// month operator++(int) noexcept;
// month& operator--() noexcept;
// month operator--(int) noexcept;
//
//
// month& operator+=(const months& m) noexcept;
// month& operator-=(const months& m) noexcept;
//
//
// constexpr explicit operator unsigned() const noexcept;
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const month& x, const month& y) noexcept;
// constexpr bool operator!=(const month& x, const month& y) noexcept;
// constexpr bool operator< (const month& x, const month& y) noexcept;
// constexpr bool operator> (const month& x, const month& y) noexcept;
// constexpr bool operator<=(const month& x, const month& y) noexcept;
// constexpr bool operator>=(const month& x, const month& y) noexcept;
//
//
// constexpr month operator+(const month& x, const months& y) noexcept;
// constexpr month operator+(const months& x, const month& y) noexcept;
// constexpr month operator-(const month& x, const months& y) noexcept;
// constexpr months operator-(const month& x, const month& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const month& m);
// constexpr month jan{1};

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,10 +24,10 @@
// {
// public:
// constexpr month_day(const date::month& m, const date::day& d) noexcept;
//
//
// constexpr date::month month() const noexcept;
// constexpr date::day day() const noexcept;
//
//
// constexpr bool ok() const noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,7 +24,7 @@
// {
// public:
// constexpr explicit month_day_last(const date::month& m) noexcept;
//
//
// constexpr date::month month() const noexcept;
// constexpr bool ok() const noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,10 +25,10 @@
// public:
// constexpr month_weekday(const date::month& m,
// const date::weekday_indexed& wdi) noexcept;
//
//
// constexpr date::month month() const noexcept;
// constexpr date::weekday_indexed weekday_indexed() const noexcept;
//
//
// constexpr bool ok() const noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,10 +25,10 @@
// public:
// constexpr month_weekday_last(const date::month& m,
// const date::weekday_last& wdl) noexcept;
//
//
// constexpr date::month month() const noexcept;
// constexpr date::weekday_last weekday_last() const noexcept;
//
//
// constexpr bool ok() const noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// day / day not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// int / month not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// int / year not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// last / last not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,7 +24,7 @@
// constexpr month_day_last operator/(int m, last_spec) noexcept;
// constexpr month_day_last operator/(last_spec, const month& m) noexcept;
// constexpr month_day_last operator/(last_spec, int m) noexcept;
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// month_day / month_day not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// month / month not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// month / year not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -42,7 +42,7 @@ main()
{
using std::is_same;
using namespace date;
static_assert(is_same<decltype(test( 1, 1, 1)), int>{}, "");
static_assert(is_same<decltype(test( 1, 1, 1_d)), month_day>{}, "");
static_assert(is_same<decltype(test( 1, 1, jan)), void>{}, "");
@@ -50,7 +50,7 @@ main()
static_assert(is_same<decltype(test( 1, 1, last)), month_day_last>{}, "");
static_assert(is_same<decltype(test( 1, 1, sun[1])), month_weekday>{}, "");
static_assert(is_same<decltype(test( 1, 1, sun[last])), month_weekday_last>{}, "");
static_assert(is_same<decltype(test( 1, 1_d, 1)), year_month_day>{}, "");
static_assert(is_same<decltype(test( 1, 1_d, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_d, jan)), void>{}, "");
@@ -58,7 +58,7 @@ main()
static_assert(is_same<decltype(test( 1, 1_d, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_d, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_d, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1, jan, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1, jan, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1, jan, jan)), void>{}, "");
@@ -66,7 +66,7 @@ main()
static_assert(is_same<decltype(test( 1, jan, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, jan, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1, jan, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, jan)), void>{}, "");
@@ -74,7 +74,7 @@ main()
static_assert(is_same<decltype(test( 1, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1, last, 1)), year_month_day_last>{}, "");
static_assert(is_same<decltype(test( 1, last, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1, last, jan)), void>{}, "");
@@ -82,7 +82,7 @@ main()
static_assert(is_same<decltype(test( 1, last, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, last, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1, last, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[1], 1)), year_month_weekday>{}, "");
static_assert(is_same<decltype(test( 1, sun[1], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[1], jan)), void>{}, "");
@@ -90,7 +90,7 @@ main()
static_assert(is_same<decltype(test( 1, sun[1], last)), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[1], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[1], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[last], 1)), year_month_weekday_last>{}, "");
static_assert(is_same<decltype(test( 1, sun[last], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[last], jan)), void>{}, "");
@@ -98,7 +98,7 @@ main()
static_assert(is_same<decltype(test( 1, sun[last], last)), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[last], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1, sun[last], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1, 1)), year_month_day>{}, "");
static_assert(is_same<decltype(test( 1_d, 1, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1, jan)), void>{}, "");
@@ -106,7 +106,7 @@ main()
static_assert(is_same<decltype(test( 1_d, 1, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_d, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_d, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_d, jan)), void>{}, "");
@@ -114,7 +114,7 @@ main()
static_assert(is_same<decltype(test( 1_d, 1_d, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_d, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_d, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, jan, 1)), year_month_day>{}, "");
static_assert(is_same<decltype(test( 1_d, jan, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, jan, jan)), void>{}, "");
@@ -122,7 +122,7 @@ main()
static_assert(is_same<decltype(test( 1_d, jan, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, jan, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, jan, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_y, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_y, jan)), void>{}, "");
@@ -130,7 +130,7 @@ main()
static_assert(is_same<decltype(test( 1_d, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_y, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, 1_y, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, last, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, last, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, last, jan)), void>{}, "");
@@ -138,7 +138,7 @@ main()
static_assert(is_same<decltype(test( 1_d, last, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, last, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, last, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[1], 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[1], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[1], jan)), void>{}, "");
@@ -146,7 +146,7 @@ main()
static_assert(is_same<decltype(test( 1_d, sun[1], last)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[1], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[1], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[last], 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[last], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[last], jan)), void>{}, "");
@@ -154,7 +154,7 @@ main()
static_assert(is_same<decltype(test( 1_d, sun[last], last)), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[last], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_d, sun[last], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( jan, 1, 1)), year_month_day>{}, "");
static_assert(is_same<decltype(test( jan, 1, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( jan, 1, jan)), void>{}, "");
@@ -162,7 +162,7 @@ main()
static_assert(is_same<decltype(test( jan, 1, last)), void>{}, "");
static_assert(is_same<decltype(test( jan, 1, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( jan, 1, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_d, 1)), year_month_day>{}, "");
static_assert(is_same<decltype(test( jan, 1_d, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_d, jan)), void>{}, "");
@@ -170,7 +170,7 @@ main()
static_assert(is_same<decltype(test( jan, 1_d, last)), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_d, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_d, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( jan, jan, 1)), void>{}, "");
static_assert(is_same<decltype(test( jan, jan, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( jan, jan, jan)), void>{}, "");
@@ -178,7 +178,7 @@ main()
static_assert(is_same<decltype(test( jan, jan, last)), void>{}, "");
static_assert(is_same<decltype(test( jan, jan, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( jan, jan, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_y, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_y, jan)), void>{}, "");
@@ -186,7 +186,7 @@ main()
static_assert(is_same<decltype(test( jan, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_y, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( jan, 1_y, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( jan, last, 1)), year_month_day_last>{}, "");
static_assert(is_same<decltype(test( jan, last, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( jan, last, jan)), void>{}, "");
@@ -194,7 +194,7 @@ main()
static_assert(is_same<decltype(test( jan, last, last)), void>{}, "");
static_assert(is_same<decltype(test( jan, last, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( jan, last, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[1], 1)), year_month_weekday>{}, "");
static_assert(is_same<decltype(test( jan, sun[1], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[1], jan)), void>{}, "");
@@ -202,7 +202,7 @@ main()
static_assert(is_same<decltype(test( jan, sun[1], last)), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[1], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[1], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[last], 1)), year_month_weekday_last>{}, "");
static_assert(is_same<decltype(test( jan, sun[last], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[last], jan)), void>{}, "");
@@ -210,7 +210,7 @@ main()
static_assert(is_same<decltype(test( jan, sun[last], last)), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[last], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( jan, sun[last], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, 1)), year_month_day>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, 1_d)), year_month_day>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, jan)), void>{}, "");
@@ -218,7 +218,7 @@ main()
static_assert(is_same<decltype(test( 1_y, 1, last)), year_month_day_last>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, sun[1])), year_month_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, sun[last])), year_month_weekday_last>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_d, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_d, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_d, jan)), void>{}, "");
@@ -226,7 +226,7 @@ main()
static_assert(is_same<decltype(test( 1_y, 1_d, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_d, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_d, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, jan, 1)), year_month_day>{}, "");
static_assert(is_same<decltype(test( 1_y, jan, 1_d)), year_month_day>{}, "");
static_assert(is_same<decltype(test( 1_y, jan, jan)), void>{}, "");
@@ -234,7 +234,7 @@ main()
static_assert(is_same<decltype(test( 1_y, jan, last)), year_month_day_last>{}, "");
static_assert(is_same<decltype(test( 1_y, jan, sun[1])), year_month_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, jan, sun[last])), year_month_weekday_last>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, jan)), void>{}, "");
@@ -242,7 +242,7 @@ main()
static_assert(is_same<decltype(test( 1_y, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, jan)), void>{}, "");
@@ -250,7 +250,7 @@ main()
static_assert(is_same<decltype(test( 1_y, last, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[1], 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[1], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[1], jan)), void>{}, "");
@@ -258,7 +258,7 @@ main()
static_assert(is_same<decltype(test( 1_y, sun[1], last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[1], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[1], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[last], 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[last], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[last], jan)), void>{}, "");
@@ -266,7 +266,7 @@ main()
static_assert(is_same<decltype(test( 1_y, sun[last], last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[last], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( 1_y, sun[last], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( last, 1, 1)), year_month_day_last>{}, "");
static_assert(is_same<decltype(test( last, 1, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( last, 1, jan)), void>{}, "");
@@ -274,7 +274,7 @@ main()
static_assert(is_same<decltype(test( last, 1, last)), void>{}, "");
static_assert(is_same<decltype(test( last, 1, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( last, 1, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( last, 1_d, 1)), void>{}, "");
static_assert(is_same<decltype(test( last, 1_d, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( last, 1_d, jan)), void>{}, "");
@@ -282,7 +282,7 @@ main()
static_assert(is_same<decltype(test( last, 1_d, last)), void>{}, "");
static_assert(is_same<decltype(test( last, 1_d, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( last, 1_d, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( last, jan, 1)), year_month_day_last>{}, "");
static_assert(is_same<decltype(test( last, jan, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( last, jan, jan)), void>{}, "");
@@ -290,7 +290,7 @@ main()
static_assert(is_same<decltype(test( last, jan, last)), void>{}, "");
static_assert(is_same<decltype(test( last, jan, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( last, jan, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( last, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( last, 1_y, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( last, 1_y, jan)), void>{}, "");
@@ -298,7 +298,7 @@ main()
static_assert(is_same<decltype(test( last, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( last, 1_y, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( last, 1_y, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( last, last, 1)), void>{}, "");
static_assert(is_same<decltype(test( last, last, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( last, last, jan)), void>{}, "");
@@ -306,7 +306,7 @@ main()
static_assert(is_same<decltype(test( last, last, last)), void>{}, "");
static_assert(is_same<decltype(test( last, last, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( last, last, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( last, sun[1], 1)), void>{}, "");
static_assert(is_same<decltype(test( last, sun[1], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( last, sun[1], jan)), void>{}, "");
@@ -314,7 +314,7 @@ main()
static_assert(is_same<decltype(test( last, sun[1], last)), void>{}, "");
static_assert(is_same<decltype(test( last, sun[1], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( last, sun[1], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( last, sun[last], 1)), void>{}, "");
static_assert(is_same<decltype(test( last, sun[last], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( last, sun[last], jan)), void>{}, "");
@@ -322,7 +322,7 @@ main()
static_assert(is_same<decltype(test( last, sun[last], last)), void>{}, "");
static_assert(is_same<decltype(test( last, sun[last], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( last, sun[last], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1, 1)), year_month_weekday>{}, "");
static_assert(is_same<decltype(test( sun[1], 1, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1, jan)), void>{}, "");
@@ -330,7 +330,7 @@ main()
static_assert(is_same<decltype(test( sun[1], 1, last)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_d, 1)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_d, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_d, jan)), void>{}, "");
@@ -338,7 +338,7 @@ main()
static_assert(is_same<decltype(test( sun[1], 1_d, last)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_d, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_d, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], jan, 1)), year_month_weekday>{}, "");
static_assert(is_same<decltype(test( sun[1], jan, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], jan, jan)), void>{}, "");
@@ -346,7 +346,7 @@ main()
static_assert(is_same<decltype(test( sun[1], jan, last)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], jan, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], jan, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_y, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_y, jan)), void>{}, "");
@@ -354,7 +354,7 @@ main()
static_assert(is_same<decltype(test( sun[1], 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_y, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], 1_y, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], last, 1)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], last, 1_d)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], last, jan)), void>{}, "");
@@ -362,7 +362,7 @@ main()
static_assert(is_same<decltype(test( sun[1], last, last)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], last, sun[1])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], last, sun[last])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[1], 1)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[1], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[1], jan)), void>{}, "");
@@ -370,7 +370,7 @@ main()
static_assert(is_same<decltype(test( sun[1], sun[1], last)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[1], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[1], sun[last])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[last], 1)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[last], 1_d)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[last], jan)), void>{}, "");
@@ -378,7 +378,7 @@ main()
static_assert(is_same<decltype(test( sun[1], sun[last], last)), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[last], sun[1])), void>{}, "");
static_assert(is_same<decltype(test( sun[1], sun[last], sun[last])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1, 1)), year_month_weekday_last>{}, "");
static_assert(is_same<decltype(test(sun[last], 1, 1_d)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1, jan)), void>{}, "");
@@ -386,7 +386,7 @@ main()
static_assert(is_same<decltype(test(sun[last], 1, last)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1, sun[1])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1, sun[last])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_d, 1)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_d, 1_d)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_d, jan)), void>{}, "");
@@ -394,7 +394,7 @@ main()
static_assert(is_same<decltype(test(sun[last], 1_d, last)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_d, sun[1])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_d, sun[last])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], jan, 1)), year_month_weekday_last>{}, "");
static_assert(is_same<decltype(test(sun[last], jan, 1_d)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], jan, jan)), void>{}, "");
@@ -402,7 +402,7 @@ main()
static_assert(is_same<decltype(test(sun[last], jan, last)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], jan, sun[1])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], jan, sun[last])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_y, 1_d)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_y, jan)), void>{}, "");
@@ -410,7 +410,7 @@ main()
static_assert(is_same<decltype(test(sun[last], 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_y, sun[1])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], 1_y, sun[last])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], last, 1)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], last, 1_d)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], last, jan)), void>{}, "");
@@ -418,7 +418,7 @@ main()
static_assert(is_same<decltype(test(sun[last], last, last)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], last, sun[1])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], last, sun[last])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[1], 1)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[1], 1_d)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[1], jan)), void>{}, "");
@@ -426,7 +426,7 @@ main()
static_assert(is_same<decltype(test(sun[last], sun[1], last)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[1], sun[1])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[1], sun[last])), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[last], 1)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[last], 1_d)), void>{}, "");
static_assert(is_same<decltype(test(sun[last], sun[last], jan)), void>{}, "");

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// weekday_indexed / weekday_indexed not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// weekday_last / weekday_last not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -22,7 +22,7 @@
// constexpr year_month operator/(const year& y, const month& m) noexcept;
// constexpr year_month operator/(const year& y, int m) noexcept;
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,7 +25,7 @@
// constexpr year_month_day_last operator/(int y, const month_day_last& mdl) noexcept;
// constexpr year_month_day_last operator/(const month_day_last& mdl, const year& y) noexcept;
// constexpr year_month_day_last operator/(const month_day_last& mdl, int y) noexcept;
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// year_month / year_month not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +21,7 @@
// SOFTWARE.
// year / year not allowed
#include "date.h"
int

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,16 +26,16 @@
// {
// public:
// using precision = std::chrono::hours;
//
//
// constexpr explicit time_of_day(std::chrono::hours since_midnight) noexcept;
// constexpr time_of_day(std::chrono::hours h, unsigned md) noexcept;
//
//
// constexpr std::chrono::hours hours() const noexcept;
// constexpr unsigned mode() const noexcept;
//
//
// constexpr explicit operator precision() const noexcept;
// constexpr precision to_duration() const noexcept;
//
//
// void make24() noexcept;
// void make12() noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -27,21 +27,21 @@
// {
// public:
// using precision = std::chrono::std::chrono::duration<Rep, Period>;
//
//
// constexpr explicit time_of_day(precision since_midnight) noexcept;
// constexpr time_of_day(std::chrono::hours h, std::chrono::minutes m,
// std::chrono::seconds s, precision sub_s,
// unsigned md) noexcept;
//
//
// constexpr std::chrono::hours hours() const noexcept;
// constexpr std::chrono::minutes minutes() const noexcept;
// constexpr std::chrono::seconds seconds() const noexcept;
// constexpr precision subseconds() const noexcept;
// constexpr unsigned mode() const noexcept;
//
//
// constexpr explicit operator precision() const noexcept;
// constexpr precision to_duration() const noexcept;
//
//
// void make24() noexcept;
// void make12() noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,18 +26,18 @@
// {
// public:
// using precision = std::chrono::minutes;
//
//
// constexpr explicit time_of_day(std::chrono::minutes since_midnight) noexcept;
// constexpr time_of_day(std::chrono::hours h, std::chrono::minutes m,
// unsigned md) noexcept;
//
//
// constexpr std::chrono::hours hours() const noexcept;
// constexpr std::chrono::minutes minutes() const noexcept;
// constexpr unsigned mode() const noexcept;
//
//
// constexpr explicit operator precision() const noexcept;
// constexpr precision to_duration() const noexcept;
//
//
// void make24() noexcept;
// void make12() noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -27,21 +27,21 @@
// {
// public:
// using precision = std::chrono::std::chrono::duration<Rep, Period>;
//
//
// constexpr explicit time_of_day(precision since_midnight) noexcept;
// constexpr time_of_day(std::chrono::hours h, std::chrono::minutes m,
// std::chrono::seconds s, precision sub_s,
// unsigned md) noexcept;
//
//
// constexpr std::chrono::hours hours() const noexcept;
// constexpr std::chrono::minutes minutes() const noexcept;
// constexpr std::chrono::seconds seconds() const noexcept;
// constexpr precision subseconds() const noexcept;
// constexpr unsigned mode() const noexcept;
//
//
// constexpr explicit operator precision() const noexcept;
// constexpr precision to_duration() const noexcept;
//
//
// void make24() noexcept;
// void make12() noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,19 +26,19 @@
// {
// public:
// using precision = std::chrono::seconds;
//
//
// constexpr explicit time_of_day(std::chrono::seconds since_midnight) noexcept;
// constexpr time_of_day(std::chrono::hours h, std::chrono::minutes m,
// std::chrono::seconds s, unsigned md) noexcept;
//
//
// constexpr std::chrono::hours hours() const noexcept;
// constexpr std::chrono::minutes minutes() const noexcept;
// constexpr std::chrono::seconds seconds() const noexcept;
// constexpr unsigned mode() const noexcept;
//
//
// constexpr explicit operator precision() const noexcept;
// constexpr precision to_duration() const noexcept;
//
//
// void make24() noexcept;
// void make12() noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,18 +26,18 @@
// public:
// explicit constexpr weekday(unsigned wd) noexcept;
// constexpr weekday(const sys_days& dp) noexcept;
//
//
// weekday& operator++() noexcept;
// weekday operator++(int) noexcept;
// weekday& operator--() noexcept;
// weekday operator--(int) noexcept;
//
//
// weekday& operator+=(const days& d) noexcept;
// weekday& operator-=(const days& d) noexcept;
//
//
// constexpr explicit operator unsigned() const noexcept;
// constexpr bool ok() const noexcept;
//
//
// // tested with weekday_indexed
// constexpr weekday_indexed operator[](unsigned index) const noexcept;
// // tested with weekday_last

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,15 +24,15 @@
// {
// public:
// constexpr weekday_indexed(const date::weekday& wd, unsigned index) noexcept;
//
//
// constexpr date::weekday weekday() const noexcept;
// constexpr unsigned index() const noexcept;
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const weekday_indexed& x, const weekday_indexed& y) noexcept;
// constexpr bool operator!=(const weekday_indexed& x, const weekday_indexed& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const weekday_indexed& wdi);
#include "date.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,14 +24,14 @@
// {
// public:
// explicit constexpr weekday_last(const date::weekday& wd) noexcept;
//
//
// constexpr date::weekday weekday() const noexcept;
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const weekday_last& x, const weekday_last& y) noexcept;
// constexpr bool operator!=(const weekday_last& x, const weekday_last& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const weekday_last& wdl);
#include "date.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,20 +24,20 @@
// {
// public:
// explicit constexpr year(int y) noexcept;
//
//
// year& operator++() noexcept;
// year operator++(int) noexcept;
// year& operator--() noexcept;
// year operator--(int) noexcept;
//
//
// year& operator+=(const years& y) noexcept;
// year& operator-=(const years& y) noexcept;
//
//
// constexpr bool is_leap() const noexcept;
//
//
// constexpr explicit operator int() const noexcept;
// constexpr bool ok() const noexcept;
//
//
// static constexpr year min() noexcept;
// static constexpr year max() noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,15 +24,15 @@
// {
// public:
// constexpr year_month(const date::year& y, const date::month& m) noexcept;
//
//
// constexpr date::year year() const noexcept;
// constexpr date::month month() const noexcept;
//
//
// year_month& operator+=(const months& dm) noexcept;
// year_month& operator-=(const months& dm) noexcept;
// year_month& operator+=(const years& dy) noexcept;
// year_month& operator-=(const years& dy) noexcept;
//
//
// constexpr bool ok() const noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -27,16 +27,16 @@
// const date::day& d) noexcept;
// constexpr year_month_day(const year_month_day_last& ymdl) noexcept;
// constexpr year_month_day(const sys_days& dp) noexcept;
//
//
// year_month_day& operator+=(const months& m) noexcept;
// year_month_day& operator-=(const months& m) noexcept;
// year_month_day& operator+=(const years& y) noexcept;
// year_month_day& operator-=(const years& y) noexcept;
//
//
// constexpr date::year year() const noexcept;
// constexpr date::month month() const noexcept;
// constexpr date::day day() const noexcept;
//
//
// constexpr operator sys_days() const noexcept;
// constexpr bool ok() const noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,17 +25,17 @@
// public:
// constexpr year_month_day_last(const date::year& y,
// const date::month_day_last& mdl) noexcept;
//
//
// year_month_day_last& operator+=(const months& m) noexcept;
// year_month_day_last& operator-=(const months& m) noexcept;
// year_month_day_last& operator+=(const years& y) noexcept;
// year_month_day_last& operator-=(const years& y) noexcept;
//
//
// constexpr date::year year() const noexcept;
// constexpr date::month month() const noexcept;
// constexpr date::month_day_last month_day_last() const noexcept;
// constexpr date::day day() const noexcept;
//
//
// constexpr operator sys_days() const noexcept;
// constexpr bool ok() const noexcept;
// };
@@ -56,23 +56,23 @@
// constexpr
// year_month_day_last
// operator+(const year_month_day_last& ymdl, const months& dm) noexcept;
//
//
// constexpr
// year_month_day_last
// operator+(const months& dm, const year_month_day_last& ymdl) noexcept;
//
//
// constexpr
// year_month_day_last
// operator+(const year_month_day_last& ymdl, const years& dy) noexcept;
//
//
// constexpr
// year_month_day_last
// operator+(const years& dy, const year_month_day_last& ymdl) noexcept;
//
//
// constexpr
// year_month_day_last
// operator-(const year_month_day_last& ymdl, const months& dm) noexcept;
//
//
// constexpr
// year_month_day_last
// operator-(const year_month_day_last& ymdl, const years& dy) noexcept;

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,21 +26,21 @@
// constexpr year_month_weekday(const date::year& y, const date::month& m,
// const date::weekday_indexed& wdi) noexcept;
// constexpr year_month_weekday(const sys_days& dp) noexcept;
//
//
// year_month_weekday& operator+=(const months& m) noexcept;
// year_month_weekday& operator-=(const months& m) noexcept;
// year_month_weekday& operator+=(const years& y) noexcept;
// year_month_weekday& operator-=(const years& y) noexcept;
//
//
// constexpr date::year year() const noexcept;
// constexpr date::month month() const noexcept;
// constexpr date::weekday weekday() const noexcept;
// constexpr unsigned index() const noexcept;
// constexpr date::weekday_indexed weekday_indexed() const noexcept;
//
//
// constexpr operator sys_days() const noexcept;
// constexpr bool ok() const noexcept;
//
//
// private:
// static constexpr year_month_weekday from_day_point(const sys_days& dp) noexcept;
// };
@@ -53,23 +53,23 @@
// constexpr
// year_month_weekday
// operator+(const year_month_weekday& ymwd, const months& dm) noexcept;
//
//
// constexpr
// year_month_weekday
// operator+(const months& dm, const year_month_weekday& ymwd) noexcept;
//
//
// constexpr
// year_month_weekday
// operator+(const year_month_weekday& ymwd, const years& dy) noexcept;
//
//
// constexpr
// year_month_weekday
// operator+(const years& dy, const year_month_weekday& ymwd) noexcept;
//
//
// constexpr
// year_month_weekday
// operator-(const year_month_weekday& ymwd, const months& dm) noexcept;
//
//
// constexpr
// year_month_weekday
// operator-(const year_month_weekday& ymwd, const years& dy) noexcept;

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,17 +25,17 @@
// public:
// constexpr year_month_weekday_last(const date::year& y, const date::month& m,
// const date::weekday_last& wdl) noexcept;
//
//
// year_month_weekday_last& operator+=(const months& m) noexcept;
// year_month_weekday_last& operator-=(const months& m) noexcept;
// year_month_weekday_last& operator+=(const years& y) noexcept;
// year_month_weekday_last& operator-=(const years& y) noexcept;
//
//
// constexpr date::year year() const noexcept;
// constexpr date::month month() const noexcept;
// constexpr date::weekday weekday() const noexcept;
// constexpr date::weekday_last weekday_last() const noexcept;
//
//
// constexpr operator sys_days() const noexcept;
// constexpr bool ok() const noexcept;
// };
@@ -43,7 +43,7 @@
// constexpr
// bool
// operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) noexcept;
//
//
// constexpr
// bool
// operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) noexcept;
@@ -51,23 +51,23 @@
// constexpr
// year_month_weekday_last
// operator+(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
//
//
// constexpr
// year_month_weekday_last
// operator+(const months& dm, const year_month_weekday_last& ymwdl) noexcept;
//
//
// constexpr
// year_month_weekday_last
// operator+(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
//
//
// constexpr
// year_month_weekday_last
// operator+(const years& dy, const year_month_weekday_last& ymwdl) noexcept;
//
//
// constexpr
// year_month_weekday_last
// operator-(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
//
//
// constexpr
// year_month_weekday_last
// operator-(const year_month_weekday_last& ymwdl, const years& dy) noexcept;

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,22 +23,22 @@
// class lastweek_weekday
// {
// iso_week::weekday wd_; // exposition only
//
//
// public:
// explicit constexpr lastweek_weekday(const iso_week::weekday& wd) noexcept;
//
//
// constexpr iso_week::weekday weekday() const noexcept;
//
//
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
// constexpr bool operator!=(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
// constexpr bool operator< (const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
// constexpr bool operator> (const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
// constexpr bool operator<=(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
// constexpr bool operator>=(const lastweek_weekday& x, const lastweek_weekday& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const lastweek_weekday& md);
#include "iso_week.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -42,155 +42,155 @@ main()
{
using std::is_same;
using namespace iso_week;
static_assert(is_same<decltype(test( 1, 1, 1)), int>{}, "");
static_assert(is_same<decltype(test( 1, 1, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, mon, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1, mon, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1, mon, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1, mon, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1, mon, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_w, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_w, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_w, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_w, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_w, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( 1, last, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1, last, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1, last, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1, last, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1, last, last)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1, 1)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( mon, 1, mon)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1, 1_y)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( mon, 1, last)), void>{}, "");
static_assert(is_same<decltype(test( mon, mon, 1)), void>{}, "");
static_assert(is_same<decltype(test( mon, mon, mon)), void>{}, "");
static_assert(is_same<decltype(test( mon, mon, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( mon, mon, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( mon, mon, last)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_w, 1)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( mon, 1_w, mon)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_w, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_w, 1_y)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( mon, 1_w, last)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_y, mon)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_y, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_y, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( mon, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( mon, last, 1)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test( mon, last, mon)), void>{}, "");
static_assert(is_same<decltype(test( mon, last, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( mon, last, 1_y)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test( mon, last, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1, 1)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_w, 1, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1, 1_y)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_w, 1, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, mon, 1)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_w, mon, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, mon, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, mon, 1_y)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_w, mon, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_w, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_w, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_w, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_w, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_w, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_y, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_y, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_y, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, last, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, last, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, last, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, last, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_w, last, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, 1)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, mon)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, mon, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, mon, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, mon, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, mon, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, mon, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_w, 1)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_w, mon)), year_weeknum_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_w, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_w, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_w, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, mon)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, 1)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, last, mon)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test( 1_y, last, 1_w)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, 1_y)), void>{}, "");
static_assert(is_same<decltype(test( 1_y, last, last)), void>{}, "");
static_assert(is_same<decltype(test(last, 1, 1)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test(last, 1, mon)), void>{}, "");
static_assert(is_same<decltype(test(last, 1, 1_w)), void>{}, "");
static_assert(is_same<decltype(test(last, 1, 1_y)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test(last, 1, last)), void>{}, "");
static_assert(is_same<decltype(test(last, mon, 1)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test(last, mon, mon)), void>{}, "");
static_assert(is_same<decltype(test(last, mon, 1_w)), void>{}, "");
static_assert(is_same<decltype(test(last, mon, 1_y)), year_lastweek_weekday>{}, "");
static_assert(is_same<decltype(test(last, mon, last)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_w, 1)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_w, mon)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_w, 1_w)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_w, 1_y)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_w, last)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_y, 1)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_y, mon)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_y, 1_w)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_y, 1_y)), void>{}, "");
static_assert(is_same<decltype(test(last, 1_y, last)), void>{}, "");
static_assert(is_same<decltype(test(last, last, 1)), void>{}, "");
static_assert(is_same<decltype(test(last, last, mon)), void>{}, "");
static_assert(is_same<decltype(test(last, last, 1_w)), void>{}, "");
static_assert(is_same<decltype(test(last, last, 1_y)), void>{}, "");
static_assert(is_same<decltype(test(last, last, last)), void>{}, "");
}

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -27,19 +27,19 @@
// explicit constexpr weekday(unsigned wd) noexcept;
// constexpr weekday(date::weekday wd) noexcept;
// constexpr weekday(const sys_days& dp) noexcept;
//
//
// weekday& operator++() noexcept;
// weekday operator++(int) noexcept;
// weekday& operator--() noexcept;
// weekday operator--(int) noexcept;
//
//
// weekday& operator+=(const days& d) noexcept;
// weekday& operator-=(const days& d) noexcept;
//
//
// constexpr explicit operator unsigned() const noexcept;
// constexpr operator date::weekday() const noexcept;
// constexpr bool ok() const noexcept;
//
//
// // tested with weekday_indexed
// constexpr weekday_indexed operator[](unsigned index) const noexcept;
// // tested with weekday_last

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,34 +23,34 @@
// class weeknum
// {
// unsigned char wn_;
//
//
// public:
// explicit constexpr weeknum(unsigned wn) noexcept;
//
//
// weeknum& operator++() noexcept;
// weeknum operator++(int) noexcept;
// weeknum& operator--() noexcept;
// weeknum operator--(int) noexcept;
//
//
// weeknum& operator+=(const weeks& y) noexcept;
// weeknum& operator-=(const weeks& y) noexcept;
//
//
// constexpr explicit operator unsigned() const noexcept;
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const weeknum& x, const weeknum& y) noexcept;
// constexpr bool operator!=(const weeknum& x, const weeknum& y) noexcept;
// constexpr bool operator< (const weeknum& x, const weeknum& y) noexcept;
// constexpr bool operator> (const weeknum& x, const weeknum& y) noexcept;
// constexpr bool operator<=(const weeknum& x, const weeknum& y) noexcept;
// constexpr bool operator>=(const weeknum& x, const weeknum& y) noexcept;
//
//
// constexpr weeknum operator+(const weeknum& x, const weeks& y) noexcept;
// constexpr weeknum operator+(const weeks& x, const weeknum& y) noexcept;
// constexpr weeknum operator-(const weeknum& x, const weeks& y) noexcept;
// constexpr weeks operator-(const weeknum& x, const weeknum& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const weeknum& wn);
//
// constexpr weeknum operator "" _w(unsigned long long wn) noexcept;

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,24 +24,24 @@
// {
// iso_week::weeknum wn_; // exposition only
// iso_week::weekday wd_; // exposition only
//
//
// public:
// constexpr weeknum_weekday(const iso_week::weeknum& wn,
// const iso_week::weekday& wd) noexcept;
//
//
// constexpr iso_week::weeknum weeknum() const noexcept;
// constexpr iso_week::weekday weekday() const noexcept;
//
//
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
// constexpr bool operator!=(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
// constexpr bool operator< (const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
// constexpr bool operator> (const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
// constexpr bool operator<=(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
// constexpr bool operator>=(const weeknum_weekday& x, const weeknum_weekday& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const weeknum_weekday& md);
#include "iso_week.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,18 +24,18 @@
// {
// public:
// explicit constexpr year(int y) noexcept;
//
//
// year& operator++() noexcept;
// year operator++(int) noexcept;
// year& operator--() noexcept;
// year operator--(int) noexcept;
//
//
// year& operator+=(const years& y) noexcept;
// year& operator-=(const years& y) noexcept;
//
//
// constexpr explicit operator int() const noexcept;
// constexpr bool ok() const noexcept;
//
//
// static constexpr year min() noexcept;
// static constexpr year max() noexcept;
// };

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,30 +23,30 @@
// class year_lastweek
// {
// iso_week::year y_;
//
//
// public:
// explicit constexpr year_lastweek(const iso_week::year& y) noexcept;
//
//
// constexpr iso_week::year year() const noexcept;
// constexpr iso_week::weeknum weeknum() const noexcept;
//
//
// year_lastweek& operator+=(const years& dy) noexcept;
// year_lastweek& operator-=(const years& dy) noexcept;
//
//
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const year_lastweek& x, const year_lastweek& y) noexcept;
// constexpr bool operator!=(const year_lastweek& x, const year_lastweek& y) noexcept;
// constexpr bool operator< (const year_lastweek& x, const year_lastweek& y) noexcept;
// constexpr bool operator> (const year_lastweek& x, const year_lastweek& y) noexcept;
// constexpr bool operator<=(const year_lastweek& x, const year_lastweek& y) noexcept;
// constexpr bool operator>=(const year_lastweek& x, const year_lastweek& y) noexcept;
//
//
// constexpr year_lastweek operator+(const year_lastweek& ym, const years& dy) noexcept;
// constexpr year_lastweek operator+(const years& dy, const year_lastweek& ym) noexcept;
// constexpr year_lastweek operator-(const year_lastweek& ym, const years& dy) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const year_lastweek& ym);
#include "iso_week.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,29 +25,29 @@
// public:
// constexpr year_lastweek_weekday(const iso_week::year& y,
// const iso_week::weekday& wd) noexcept;
//
//
// year_lastweek_weekday& operator+=(const years& y) noexcept;
// year_lastweek_weekday& operator-=(const years& y) noexcept;
//
//
// constexpr iso_week::year year() const noexcept;
// constexpr iso_week::weeknum weeknum() const noexcept;
// constexpr iso_week::weekday weekday() const noexcept;
//
//
// constexpr operator sys_days() const noexcept;
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
// constexpr bool operator!=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
// constexpr bool operator< (const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
// constexpr bool operator> (const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
// constexpr bool operator<=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
// constexpr bool operator>=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) noexcept;
//
//
// constexpr year_lastweek_weekday operator+(const year_lastweek_weekday& x, const years& y) noexcept;
// constexpr year_lastweek_weekday operator+(const years& y, const year_lastweek_weekday& x) noexcept;
// constexpr year_lastweek_weekday operator-(const year_lastweek_weekday& x, const years& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const year_lastweek_weekday& x);
#include "iso_week.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -24,30 +24,30 @@
// {
// iso_week::year y_;
// iso_week::weeknum wn_;
//
//
// public:
// constexpr year_weeknum(const iso_week::year& y, const iso_week::weeknum& wn) noexcept;
//
//
// constexpr iso_week::year year() const noexcept;
// constexpr iso_week::weeknum weeknum() const noexcept;
//
//
// year_weeknum& operator+=(const years& dy) noexcept;
// year_weeknum& operator-=(const years& dy) noexcept;
//
//
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const year_weeknum& x, const year_weeknum& y) noexcept;
// constexpr bool operator!=(const year_weeknum& x, const year_weeknum& y) noexcept;
// constexpr bool operator< (const year_weeknum& x, const year_weeknum& y) noexcept;
// constexpr bool operator> (const year_weeknum& x, const year_weeknum& y) noexcept;
// constexpr bool operator<=(const year_weeknum& x, const year_weeknum& y) noexcept;
// constexpr bool operator>=(const year_weeknum& x, const year_weeknum& y) noexcept;
//
//
// constexpr year_weeknum operator+(const year_weeknum& ym, const years& dy) noexcept;
// constexpr year_weeknum operator+(const years& dy, const year_weeknum& ym) noexcept;
// constexpr year_weeknum operator-(const year_weeknum& ym, const years& dy) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const year_weeknum& ym);
#include "iso_week.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -29,29 +29,29 @@
// const iso_week::weekday& wd) noexcept;
// constexpr year_weeknum_weekday(const year_lastweek_weekday& ylwwd) noexcept;
// constexpr year_weeknum_weekday(const sys_days& dp) noexcept;
//
//
// year_weeknum_weekday& operator+=(const years& y) noexcept;
// year_weeknum_weekday& operator-=(const years& y) noexcept;
//
//
// constexpr iso_week::year year() const noexcept;
// constexpr iso_week::weeknum weeknum() const noexcept;
// constexpr iso_week::weekday weekday() const noexcept;
//
//
// constexpr operator sys_days() const noexcept;
// constexpr bool ok() const noexcept;
// };
//
//
// constexpr bool operator==(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
// constexpr bool operator!=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
// constexpr bool operator< (const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
// constexpr bool operator> (const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
// constexpr bool operator<=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
// constexpr bool operator>=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) noexcept;
//
//
// constexpr year_weeknum_weekday operator+(const year_weeknum_weekday& ywnwd, const years& y) noexcept;
// constexpr year_weeknum_weekday operator+(const years& y, const year_weeknum_weekday& ywnwd) noexcept;
// constexpr year_weeknum_weekday operator-(const year_weeknum_weekday& ywnwd, const years& y) noexcept;
//
//
// std::ostream& operator<<(std::ostream& os, const year_weeknum_weekday& ywnwd);
#include "iso_week.h"

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,17 +1,17 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

View File

@@ -1,18 +1,18 @@
#!/bin/sh
# The MIT License (MIT)
#
#
# Copyright (c) 2015 Howard Hinnant
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

24
tz.cpp
View File

@@ -1,18 +1,18 @@
// The MIT License (MIT)
//
//
// Copyright (c) 2015, 2016 Howard Hinnant
// Copyright (c) 2015 Ville Voutilainen
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -233,7 +233,7 @@ namespace // Put types in an anonymous name space.
// WARNING: this function has a hard-coded value size limit.
// It is not a general-purpose function.
// It should be sufficient for our use cases.
// It should be sufficient for our use cases.
// The function could be made workable for any size string
// but we don't need the complexity of implementing that
// for our meagre purposes right now.
@@ -292,13 +292,13 @@ static void get_windows_timezone_info(std::vector<detail::timezone_info>& tz_lis
// Open the parent time zone key that has the list of timezones in.
reg_key zones_key;
static const wchar_t zones_key_name[] =
static const wchar_t zones_key_name[] =
{ L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones" };
result = zones_key.open(zones_key_name);
// TODO! Review if this should happen here or be signalled later.
// We don't want the process to fail on startup because of this.
if (result != ERROR_SUCCESS)
throw std::runtime_error("Time Zone registry key could not be opened: "
throw std::runtime_error("Time Zone registry key could not be opened: "
+ get_win32_message(result));
DWORD size;
@@ -316,7 +316,7 @@ static void get_windows_timezone_info(std::vector<detail::timezone_info>& tz_lis
auto status = RegEnumKeyExW(zones_key.handle(), zone_index, zone_key_name, &size,
nullptr, nullptr, nullptr, nullptr);
if (status != ERROR_SUCCESS && status != ERROR_NO_MORE_ITEMS)
throw std::runtime_error("Can't enumerate time zone registry key"
throw std::runtime_error("Can't enumerate time zone registry key"
+ get_win32_message(status));
if (status == ERROR_NO_MORE_ITEMS)
break;
@@ -410,7 +410,7 @@ load_timezone_mappings_from_csv_file(const std::string& input_path)
std::string copyright;
for (int i = 0; i < 4; ++i)
getline(is, copyright);
for (;;)
{
detail::timezone_mapping zm{};
@@ -444,7 +444,7 @@ load_timezone_mappings_from_csv_file(const std::string& input_path)
}
static bool
native_to_standard_timezone_name(const std::string& native_tz_name,
native_to_standard_timezone_name(const std::string& native_tz_name,
std::string& standard_tz_name)
{
// TOOD! Need be a case insensitive compare?
@@ -1808,7 +1808,7 @@ time_zone::get_info_impl(sys_seconds tp, int tz_int) const
return timezone == tz::utc ? t < zl.until_utc_ :
t < sys_seconds{zl.until_loc_.time_since_epoch()};
});
sys_info r{};
if (i != zonelets_.end())
{
@@ -2365,7 +2365,7 @@ current_zone()
if (tz_result == TIME_ZONE_ID_INVALID)
{
auto error_code = ::GetLastError(); // Store this quick before it gets overwritten.
throw std::runtime_error("GetTimeZoneInformation failed: "
throw std::runtime_error("GetTimeZoneInformation failed: "
+ get_win32_message(error_code));
}
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;

12
tz.h
View File

@@ -2,19 +2,19 @@
#define TZ_H
// The MIT License (MIT)
//
//
// Copyright (c) 2015, 2016 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -193,7 +193,7 @@ ambiguous_local_time::make_msg(local_time<Duration> tp,
std::ostringstream os;
os << tp << " is ambiguous. It could be\n"
<< tp << ' ' << first_abbrev << " == "
<< tp - first_offset << " UTC or\n"
<< tp - first_offset << " UTC or\n"
<< tp << ' ' << second_abbrev << " == "
<< tp - second_offset << " UTC";
return os.str();
@@ -684,7 +684,7 @@ struct TZ_DB
std::vector<detail::timezone_mapping> mappings;
std::vector<detail::timezone_info> native_zones;
#endif
TZ_DB() = default;
#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
TZ_DB(TZ_DB&&) = default;

View File

@@ -2,19 +2,19 @@
#define TZ_PRIVATE_H
// The MIT License (MIT)
//
//
// Copyright (c) 2015, 2016 Howard Hinnant
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -67,9 +67,9 @@ private:
#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
U() : month_day_{date::jan/1} {}
#else
U() :
month_day_(date::jan/1),
month_weekday_last_(date::month(0U), date::weekday_last(date::weekday(0U)))
U() :
month_day_(date::jan/1),
month_weekday_last_(date::month(0U), date::weekday_last(date::weekday(0U)))
{}
#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)