mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
2.0 KiB
2.0 KiB
| title |
|---|
| weekday_indexed |
{{< callout type="info">}}
Header: chrono.h
From: 20.41.0
Similar to: std::chrono::weekday_indexed
{{< /callout >}}
A class representing an indexed weekday.
class weekday_indexed
Construction
ETL_CONSTEXPR
weekday_indexed()
ETL_NOEXCEPT
Description
Default constructor.
ETL_CONSTEXPR14
weekday_indexed(const etl::chrono::weekday& wd, unsigned index)
ETL_NOEXCEPT
Description
Construct from weekday and index.
ETL_CONSTEXPR14
weekday_indexed(const etl::chrono::weekday_indexed& other)
ETL_NOEXCEPT
Description
Copy constructor.
Tests
ETL_NODISCARD
ETL_CONSTEXPR14
bool ok() const
ETL_NOEXCEPT
Return
true if the weekday_indexed is valid
ETL_NODISCARD
ETL_CONSTEXPR14
bool is_weekend() const
ETL_NOEXCEPT
Return
true if the weekday_indexed is a Saturday or Sunday.
Assignment
ETL_CONSTEXPR14
etl::chrono::weekday_indexed& operator =(const etl::chrono::weekday_indexed& rhs)
ETL_NOEXCEPT
Description
Assignment operator
Access
ETL_CONSTEXPR14
etl::chrono::weekday weekday() const
ETL_NOEXCEPT
Description
Gets the weekday.
ETL_CONSTEXPR14
unsigned index() const
ETL_NOEXCEPT
Description
Gets the index.
Non-member comparison operators
ETL_CONSTEXPR14
bool operator ==(const etl::chrono::weekday_indexed& m1,
const etl::chrono::weekday_indexed& m2)
ETL_NOEXCEPT
Description
Equality operator.
ETL_CONSTEXPR14
bool operator !=(const etl::chrono::weekday_indexed& m1,
const etl::chrono::weekday_indexed& m2)
ETL_NOEXCEPT
Description
Inequality operator.
Hash
template <>
struct hash<etl::chrono::weekday_indexed>
Description
Hash function for etl::chrono::weekday_indexed.