31#ifndef ETL_IN_CHRONO_H
32 #error DO NOT DIRECTLY INCLUDE THIS FILE. USE CHRONO.H
75 ETL_CONSTEXPR14
bool ok() const ETL_NOEXCEPT
77 return m.ok() && wdi.ok();
92 return (lhs.month() == rhs.month()) &&
93 (lhs.weekday_indexed() == rhs.weekday_indexed());
102 return !(lhs == rhs);
144 ETL_CONSTEXPR14
bool ok() const ETL_NOEXCEPT
146 return m.ok() && wdl.ok();
161 return (lhs.month() == rhs.month()) && (lhs.weekday_last() == rhs.weekday_last());
170 return !(lhs == rhs);
177#if ETL_USING_8BIT_TYPES
179 struct hash<
etl::chrono::month_weekday>
183 etl::chrono::month::rep a =
static_cast<etl::chrono::month::rep
>(
static_cast<unsigned>(mw.
month()));
187 uint8_t buffer[
sizeof(a) +
sizeof(b) +
sizeof(c)];
189 memcpy(buffer, &a,
sizeof(a));
190 memcpy(buffer +
sizeof(a), &b,
sizeof(b));
191 memcpy(buffer +
sizeof(b), &b,
sizeof(c));
193 return etl::private_hash::generic_hash<size_t>(buffer, buffer +
sizeof(a) +
sizeof(b) +
sizeof(c));
201#if ETL_USING_8BIT_TYPES
205 size_t operator()(
const etl::chrono::month_weekday_last& mw)
const
207 etl::chrono::month::rep a =
static_cast<etl::chrono::month::rep
>(
static_cast<unsigned>(mw.
month()));
210 uint8_t buffer[
sizeof(a) +
sizeof(b)];
212 memcpy(buffer, &a,
sizeof(a));
213 memcpy(buffer +
sizeof(a), &b,
sizeof(b));
215 return etl::private_hash::generic_hash<size_t>(buffer, buffer +
sizeof(a) +
sizeof(b));
Construct from month and weekday_last.
Definition month_weekday.h:109
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:115
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::month month() const ETL_NOEXCEPT
Returns the month.
Definition month_weekday.h:126
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday_last weekday_last() const ETL_NOEXCEPT
Returns the weekday_indexed.
Definition month_weekday.h:135
ETL_NODISCARD ETL_CONSTEXPR14 bool ok() const ETL_NOEXCEPT
Returns true if the month/day is valid.
Definition month_weekday.h:144
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:75
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:57
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday_indexed weekday_indexed() const ETL_NOEXCEPT
Returns the weekday_indexed.
Definition month_weekday.h:66
month
Definition month.h:54
weekday_indexed
Definition weekday.h:344
ETL_NODISCARD ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday weekday() const ETL_NOEXCEPT
Get weekday.
Definition weekday.h:389
ETL_NODISCARD ETL_NODISCARD ETL_CONSTEXPR14 unsigned index() const ETL_NOEXCEPT
Get index.
Definition weekday.h:398
weekday_last
Definition weekday.h:439
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::weekday weekday() const ETL_NOEXCEPT
Get weekday.
Definition weekday.h:471
ETL_NODISCARD ETL_CONSTEXPR14 unsigned c_encoding() const ETL_NOEXCEPT
Get the C encoding of the weekday.
Definition weekday.h:212
bitset_ext
Definition absolute.h:39