8#include "../utility/module.hpp"
9#include "../strings.hpp"
11namespace hi::inline
v1 {
22 constexpr iso_3166() noexcept : _v(0) {}
24 constexpr iso_3166(uint16_t number) : _v(number)
26 hi_check(number <= 999,
"ISO-3166 number must be between 0 and 999, got {}", number);
31 constexpr iso_3166(intrinsic_t, uint16_t v) noexcept : _v(v)
36 [[nodiscard]]
constexpr uint16_t
const& intrinsic()
const noexcept
41 [[nodiscard]]
constexpr uint16_t& intrinsic()
noexcept
46 [[nodiscard]]
constexpr bool empty()
const noexcept
51 constexpr explicit operator bool()
const noexcept
56 [[nodiscard]]
constexpr uint16_t number()
const noexcept
61 [[nodiscard]] std::string_view code2()
const noexcept;
62 [[nodiscard]] std::string_view code3()
const noexcept;
64 [[nodiscard]]
constexpr friend bool operator==(
iso_3166 const& lhs,
iso_3166 const& rhs)
noexcept =
default;
65 [[nodiscard]]
constexpr friend auto operator<=>(
iso_3166 const& lhs,
iso_3166 const& rhs)
noexcept =
default;
75 return lhs.empty() or lhs == rhs;
86 [[nodiscard]]
size_t operator()(hi::iso_3166
const& rhs)
const noexcept
#define hi_check(expression, message,...)
Check if the expression is valid, or throw a parse_error.
Definition assert.hpp:110
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:253
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
ISO-3166 country code.
Definition iso_3166.hpp:15
constexpr friend bool matches(iso_3166 const &lhs, iso_3166 const &rhs) noexcept
Check if rhs matches with lhs.
Definition iso_3166.hpp:73