mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-10 07:09:46 +08:00
* Fix histogram test Use different Start index so skipped start_index copy would not get unnoticed in the test. * Fix several test_vector_* for valid data Instead of comparing the moved-from data which is invalid, compare with the valid initial_data. * Fix test_vector to check for the correct iterator position after erase This was done before, but a recent change dropped it. * Fix bit_stream: Guard nbits > 0 to prevent division by zero * Cleanup --------- Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2.6 KiB
2.6 KiB
| title |
|---|
| month_weekday |
{{< callout type="info">}}
Header: chrono.h
From: 20.41.0
Similar to: std::chrono::month_weekday
{{< /callout >}}
A class representing a month and weekday.
class month_weekday
Construction
ETL_CONSTEXPR
month_weekday()
Description
Default constructor.
ETL_CONSTEXPR14
month_weekday(const etl::chrono::month& m,
const etl::chrono::weekday_indexed& wd)
ETL_NOEXCEPT
Description
Construct from month and weekday_indexed.
Access
ETL_NODISCARD
ETL_CONSTEXPR14
etl::chrono::month month() const
ETL_NOEXCEPT
Returns
The month.
ETL_NODISCARD
ETL_CONSTEXPR14
etl::chrono::weekday_indexed weekday_indexed() const
ETL_NOEXCEPT
Return
The weekday.
Tests
ETL_NODISCARD
ETL_CONSTEXPR14
bool ok() const
ETL_NOEXCEPT
Return
true if the month and day is within the valid limits.
Non-member comparison operators
ETL_CONSTEXPR14
bool operator ==(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
Description
Equality operator.
ETL_CONSTEXPR14
bool operator !=(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
Description
Inequality operator.
ETL_CONSTEXPR14
bool operator <(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
Description
Less-than operator.
ETL_CONSTEXPR14
bool operator <=(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
Description
Less-than-equal operator.
ETL_CONSTEXPR14
bool operator <(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
Description
Greater-than operator.
ETL_CONSTEXPR14
bool operator <=(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
Description
Greater-than-equal operator.
[[nodiscard]] constexpr
auto operator <=>(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
Description
Spaceship operator.
C++20
Hash
template <typename TRep, typename TPeriod>
struct hash<etl::chrono::month_weekday>
Description
Hash function for etl::chrono::month_weekday.