skip_handlerļƒ

The skip_handler, unlike the ztd::text::replacement_handler_t, passes over any malformed input and performs no changes to the output. It is considered a subset of the behavior of the replacement error handler.

The skipping is done by calling ztd::text::skip_input_error(ā€¦) with the encoding and result.

constexpr skip_handler_t ztd::text::skip_handler = {}ļƒ

An instance of skip_handler_t for ease of use.

class skip_handler_tļƒ

An error handler that simply skips bad input on error, and performs no replacement.

Remark

If a sequence of text depends on the state of the previous text, and there is an illegal sequence in the middle of such a sequence, using their error handler can cause a cascade of failures as the state may not be prepared for the new input; therefore, it may skip more than a user of this error handler might expect. This is something that may happen due to shift state issues (e.g., when an encoding is not self-synchronizing (ztd::text::is_self_syncrhonizing_code)).

Public Functions

template<typename _Encoding, typename _Result, typename _InputProgress, typename _OutputProgress>
inline constexpr auto operator()(const _Encoding &__encoding, _Result &&__result, const _InputProgress &__input_progress, const _OutputProgress &__output_progress) const noexcept(::ztd::text::is_input_error_skippable_v<const _Encoding&, _Result, const _InputProgress&, const _OutputProgress&>)ļƒ

Skips over any input that may produce an error.

Parameters:
  • __encoding ā€“ [in] The Encoding that experienced the error.

  • __result ā€“ [in] The current state of the encode operation.

  • __input_progress ā€“ [in] How much input was (potentially irreversibly) read from the input range before undergoing the attempted encode operation.

  • __output_progress ā€“ [in] How much output was (potentially irreversibly) written to the output range before undergoing the attempted encode operation.