stateless_transcode_resultļƒ

template<typename _Input, typename _Output>
class stateless_transcode_resultļƒ

The result of transcoding operations (such as ztd::text::transcode) that specifically do not include a reference to the state.

Subclassed by pivotless_transcode_result< _Input, _Output, _FromState, _ToState >

Public Functions

template<typename _ArgInput, typename _ArgOutput, ::std::enable_if_t<__txt_detail::__result_type_copy_constraint<::ztd::text::stateless_transcode_result, _Input, _ArgInput, _Output, _ArgOutput>()>* = nullptr>
inline constexpr stateless_transcode_result(const stateless_transcode_result<_ArgInput, _ArgOutput> &__other) noexcept(__txt_detail::__result_type_copy_noexcept<::ztd::text::stateless_transcode_result, _Input, _ArgInput, _Output, _ArgOutput>())ļƒ

Constructs a ztd::text::stateless_transcode_result with the provided parameters and information, including whether or not an error was handled.

Parameters:

__other ā€“ [in] A different but related result type.

template<typename _ArgInput, typename _ArgOutput, ::std::enable_if_t<__txt_detail::__result_type_move_constraint<::ztd::text::stateless_transcode_result, _Input, _ArgInput, _Output, _ArgOutput>()>* = nullptr>
inline constexpr stateless_transcode_result(stateless_transcode_result<_ArgInput, _ArgOutput> &&__other) noexcept(__txt_detail::__result_type_move_noexcept<::ztd::text::stateless_transcode_result, _Input, _ArgInput, _Output, _ArgOutput>)ļƒ

Constructs a ztd::text::stateless_transcode_result with the provided parameters and information, including whether or not an error was handled.

Parameters:

__other ā€“ [in] A different but related result type.

template<typename _ArgInput, typename _ArgOutput>
inline constexpr stateless_transcode_result(_ArgInput &&__input, _ArgOutput &&__output, encoding_error __error_code = encoding_error::ok) noexcept(noexcept(stateless_transcode_result(::std::forward<_ArgInput>(__input), ::std::forward<_ArgOutput>(__output), __error_code, __error_code != encoding_error::ok)))ļƒ

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

Parameters:
  • __input ā€“ [in] The input range to store.

  • __output ā€“ [in] The output range to store.

  • __error_code ā€“ [in] The error code for the encode operation, taken as the first of either the encode or decode operation that failed.

template<typename _ArgInput, typename _ArgOutput>
inline constexpr stateless_transcode_result(_ArgInput &&__input, _ArgOutput &&__output, encoding_error __error_code, ::std::size_t __error_count) noexcept(::std::is_nothrow_constructible_v<_Input, _ArgInput> && ::std::is_nothrow_constructible_v<_Output, _ArgOutput>)ļƒ

Constructs a ztd::text::stateless_transcode_result with the provided parameters and information, including whether or not an error was handled.

Parameters:
  • __input ā€“ [in] The input range to store.

  • __output ā€“ [in] The output range to store.

  • __error_code ā€“ [in] The error code for the encode operation, taken as the first of either the encode or decode operation that failed.

  • __error_count ā€“ [in] Whether or not an error was handled. Some error handlers are corrective (see ztd::text::replacement_handler_t), and so the error code is not enough to determine if the handler was invoked. This allows the value to be provided directly when constructing this result type.

inline constexpr bool errors_were_handled() const noexceptļƒ

Whether or not any errors were handled.

Returns:

Simply checks whether error_count is greater than 0.

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).

_Output outputļƒ

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

encoding_error error_codeļƒ

The kind of error that occured, if any.

::std::size_t error_countļƒ

Whether or not the error handler was invoked, regardless of if the error_code is set or not set to ztd::text::encoding_error::ok.