rll::detail namespace

Contracts implementation details.

Classes

template <typename T>
struct char_or_throw
template <typename T>
struct char_reader
template <>
struct char_reader<char>
template <>
struct char_reader<char16_t>
template <>
struct char_reader<char32_t>
template <>
struct char_reader<char8_t>
template <>
struct char_reader<wchar_t>
struct symbol
template <typename T>
struct utf16_reader
template <typename T>
struct utf32_reader
template <typename T>
struct utf8_reader

Functions

auto make_contract_violation(contract_type type, std::string_view message, source_location location = source_location::current()) →  contract_violation
Creates a contract violation data structure from current location in the source code.
template <typename T>
auto next_char(T const*& it, T const* begin, T const* end) →  char constexpr noexcept(…)
template <typename T>
auto next_char_or_error(T const*& it, T const* end, bool& error, u32& error_symbol) →  char constexpr noexcept
void violate(contract_type type, std::string_view message, source_location const& location = source_location::current())
Invokes the global contract violation handler (see violation_handler) with the violation data from current location in the source code.

Function documentation

contract_violation rll::detail::make_contract_violation(contract_type type, std::string_view message, source_location location = source_location::current())

Creates a contract violation data structure from current location in the source code.

Parameters
type Type of violated contract.
message Violation message.
location Violation location in source code. Defaults to current location.
Returns Contract violation data structure.

template <typename T>
char rll::detail::next_char(T const*& it, T const* begin, T const* end) constexpr noexcept(…)

template <typename T>
char rll::detail::next_char_or_error(T const*& it, T const* end, bool& error, u32& error_symbol) constexpr noexcept

void rll::detail::violate(contract_type type, std::string_view message, source_location const& location = source_location::current())

Invokes the global contract violation handler (see violation_handler) with the violation data from current location in the source code.

Parameters
type Type of violated contract.
message Violation message.
location Violation location in source code. Defaults to current location.