stateless_validate_result¶

template<typename _Input>
class ztd::text::stateless_validate_result¶

The result of valdation operations (such as ztd_text_validate_decodable_as and ztd_text_validate_encodable_as) that specifically do not include a reference to the state.

Subclassed by validate_result< _Input, _State >, validate_transcode_result< _Input, _DecodeState, _EncodeState >

Public Functions

template<typename _ArgInput>
inline constexpr stateless_validate_result(_ArgInput &&__input, bool __is_valid)¶

Constructs a ztd::text::validate_result, defaulting the error code to ztd::text::encoding_error::ok if not provided.

Parameters
  • __input – [in] The input range to store.

  • __is_valid – [in] Whether or not the validation succeeded.

inline explicit constexpr operator bool() const noexcept¶

A conversion for use in if statements and conditional operators.

Returns

Whether or not the result is valid or not.

Public Members

_Input input¶

The reconstructed input_view object, with its .begin() incremented by the number of code units successfully read (can be identical to .begin() on original range on failure).

bool valid¶

Whether or not the specified input is valid or not.