7#include "../exception.hpp"
13namespace hi::inline v1 {
20 constexpr iso_15924() noexcept : _v(999) {}
26 constexpr iso_15924(uint16_t number) : _v(number) {
28 throw parse_error(std::format(
"Invalid script number '{}'", number));
32 iso_15924(unicode_script
const &script)
noexcept;
35 [[nodiscard]]
constexpr bool empty()
const noexcept
40 explicit operator bool()
const noexcept
47 [[nodiscard]]
constexpr uint16_t
number() const noexcept {
53 [[nodiscard]] std::string_view
code4() const noexcept;
57 [[nodiscard]]
std::string_view code4_open_type() const noexcept;
59 [[nodiscard]] constexpr friend
bool operator==(
iso_15924 const &lhs,
iso_15924 const &rhs) noexcept = default;
69 [[nodiscard]]
size_t operator()(hi::iso_15924
const &rhs)
const noexcept
Exception thrown during parsing on an error.
Definition exception.hpp:25
ISO-15924 script code.
Definition iso_15924.hpp:18
std::string_view code4() const noexcept
Get the iso-15924 4-letter code.
constexpr uint16_t number() const noexcept
Get the iso-15924 numeric value.
Definition iso_15924.hpp:47