31#ifndef ETL_IN_CHRONO_H
32 #error DO NOT DIRECTLY INCLUDE THIS FILE. USE CHRONO.H
71 ETL_NODISCARD ETL_CONSTEXPR14
bool ok() const ETL_NOEXCEPT
73 return m.ok() && wdi.ok();
87 return (lhs.month() == rhs.month()) && (lhs.weekday_indexed() == rhs.weekday_indexed());
133 ETL_NODISCARD ETL_CONSTEXPR14
bool ok() const ETL_NOEXCEPT
135 return m.ok() && wdl.ok();
149 return (lhs.month() == rhs.month()) && (lhs.weekday_last() == rhs.weekday_last());
157 return !(lhs == rhs);
164#if ETL_USING_8BIT_TYPES
166 struct hash<
etl::chrono::month_weekday>
170 etl::chrono::month::rep a =
static_cast<etl::chrono::month::rep
>(
static_cast<unsigned>(mw.
month()));
174 uint8_t buffer[
sizeof(a) +
sizeof(b) +
sizeof(c)];
176 memcpy(buffer, &a,
sizeof(a));
177 memcpy(buffer +
sizeof(a), &b,
sizeof(b));
178 memcpy(buffer +
sizeof(a) +
sizeof(b), &c,
sizeof(c));
180 return etl::private_hash::generic_hash<size_t>(buffer, buffer +
sizeof(a) +
sizeof(b) +
sizeof(c));
188#if ETL_USING_8BIT_TYPES
192 size_t operator()(
const etl::chrono::month_weekday_last& mw)
const
194 etl::chrono::month::rep a =
static_cast<etl::chrono::month::rep
>(
static_cast<unsigned>(mw.
month()));
197 uint8_t buffer[
sizeof(a) +
sizeof(b)];
199 memcpy(buffer, &a,
sizeof(a));
200 memcpy(buffer +
sizeof(a), &b,
sizeof(b));
202 return etl::private_hash::generic_hash<size_t>(buffer, buffer +
sizeof(a) +
sizeof(b));
Construct from month and weekday_last.
Definition month_weekday.h:102
ETL_CONSTEXPR14 month_weekday_last(const etl::chrono::month &m_, const etl::chrono::weekday_last &wdl_) ETL_NOEXCEPT
Construct from month and weekday_indexed.
Definition month_weekday.h:108
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::month month() const ETL_NOEXCEPT
Returns the month.
Definition month_weekday.h:117
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday_last weekday_last() const ETL_NOEXCEPT
Returns the weekday_indexed.
Definition month_weekday.h:125
ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Returns true if the month/day is valid.
Definition month_weekday.h:133
Definition month_weekday.h:40
ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Returns true if the month/day is valid.
Definition month_weekday.h:71
ETL_CONSTEXPR14 month_weekday(const etl::chrono::month &m_, const etl::chrono::weekday_indexed &wdi_) ETL_NOEXCEPT
Construct from month and weekday_indexed.
Definition month_weekday.h:46
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::month month() const ETL_NOEXCEPT
Returns the month.
Definition month_weekday.h:55
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday_indexed weekday_indexed() const ETL_NOEXCEPT
Returns the weekday_indexed.
Definition month_weekday.h:63
month
Definition month.h:54
weekday_indexed
Definition weekday.h:338
ETL_NODISCARD ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday weekday() const ETL_NOEXCEPT
Get weekday.
Definition weekday.h:362
ETL_NODISCARD ETL_NODISCARD ETL_CONSTEXPR14 unsigned index() const ETL_NOEXCEPT
Get index.
Definition weekday.h:370
weekday_last
Definition weekday.h:409
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday weekday() const ETL_NOEXCEPT
Get weekday.
Definition weekday.h:441
ETL_NODISCARD ETL_CONSTEXPR14 unsigned c_encoding() const ETL_NOEXCEPT
Get the C encoding of the weekday.
Definition weekday.h:210
ETL_CONSTEXPR14 bool operator==(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Equality operator.
Definition day.h:166
ETL_CONSTEXPR14 bool operator!=(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Inequality operator.
Definition day.h:174
bitset_ext
Definition absolute.h:40