mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-27 08:31:03 +08:00
Remove is_leap from iso_week::year
This commit is contained in:
parent
862c7d43d6
commit
323e2fa5fd
10
iso_week.h
10
iso_week.h
@ -141,8 +141,6 @@ public:
|
||||
year& operator+=(const years& y) NOEXCEPT;
|
||||
year& operator-=(const years& y) NOEXCEPT;
|
||||
|
||||
CONSTCD11 bool is_leap() const NOEXCEPT;
|
||||
|
||||
CONSTCD11 explicit operator int() const NOEXCEPT;
|
||||
CONSTCD11 bool ok() const NOEXCEPT;
|
||||
|
||||
@ -568,14 +566,6 @@ inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return t
|
||||
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;}
|
||||
|
||||
CONSTCD11
|
||||
inline
|
||||
bool
|
||||
year::is_leap() const NOEXCEPT
|
||||
{
|
||||
return y_ % 4 == 0 && (y_ % 100 != 0 || y_ % 400 == 0);
|
||||
}
|
||||
|
||||
CONSTCD11 inline year::operator int() const NOEXCEPT {return y_;}
|
||||
CONSTCD11 inline bool year::ok() const NOEXCEPT {return min() <= *this && *this <= max();}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user