propagate_(transcode|transcode)_error

This helper function processes an error for a transcoding operation and shuffles a result through its decode step and encode step error handlers. Nominally used after a solely decode portion of a transcode operation fails.

If the user is doing a direct conversion and can simply call the encode portion of the error handler directly, calling this function can be skipped entirely by the user.

template<typename _Result, typename _Output, typename _FromEncoding, typename _ToEncoding, typename _EncodeErrorHandler, typename _DecodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _Intermediate, typename _FromState>
constexpr auto propagate_recode_encode_error(_Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, encode_result<_ResultInput, _Intermediate, _FromState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _DecodeErrorHandler &&__decode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __encode_error_handler, and __decode_error_handler and launders the ztd::text::encode_result through the __encode_error_handler. The transformed encode result is then transformed to a ztd::text::decode_result before transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact recode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __encode_result – [in] The result value that has an error in it.

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __decode_error_handler – [in] The error handler to mill the __encode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the recode operation.

  • __from_input_progress – [in] Any unread input characters in any intermediate between the (failed) encode and decode operations.

  • __from_output_progress – [in] Any unread intermediate output characters in any intermediates between the (failed) encode and decode operations.

  • __to_input_progress – [in] Any unread intermediate input characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _Output, typename _FromEncoding, typename _ToEncoding, typename _EncodeErrorHandler, typename _DecodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultIntermediate, typename _FromState>
constexpr auto propagate_recode_encode_error(_Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, encode_result<_ResultInput, _ResultIntermediate, _FromState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _DecodeErrorHandler &&__decode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __encode_error_handler, and __decode_error_handler and launders the ztd::text::encode_result through the __encode_error_handler. The transformed encode result is then transformed to a ztd::text::decode_result before transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact recode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __encode_result – [in] The result value that has an error in it.

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __decode_error_handler – [in] The error handler to mill the __encode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the recode operation.

  • __from_input_progress – [in] Any unread input characters in any intermediate between the (failed) encode and decode operations.

  • __from_output_progress – [in] Any unread intermediate output characters in any intermediates between the (failed) encode and decode operations.

  • __to_input_progress – [in] Any unread intermediate input characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _Result, typename _ToEncoding, typename _DecodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_recode_decode_error(_ToEncoding &&__to_encoding, encode_result<_ResultInput, _ResultPivot, _FromState> &&__encode_result, decode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __to_encoding and __decode_error_handler and launders the failed ztd::text::encode_result through it, producing a ztd::text::decode_result and transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact recode result type to use.

Parameters:
  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __encode_result – [in] The encode result value that has an error in it.

  • __decode_result – [in] The decode result value that has not yet been processed by the decode error handler.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _ToEncoding, typename _DecodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_recode_decode_error(_ToEncoding &&__to_encoding, encode_result<_ResultInput, _ResultPivot, _FromState> &&__encode_result, decode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Takes the given __to_encoding and __decode_error_handler and launders the failed ztd::text::encode_result through it, producing a ztd::text::decode_result and transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side. Unlike it’s counterpart, this function does not take an _Result template parameter and instead deduces the returned recode result type from inputs.

Parameters:
  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __encode_result – [in] The result value that has an error on it.

  • __decode_result – [in] The result value that has an error on it.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _Result, typename _Input, typename _Output, typename _FromEncoding, typename _ToEncoding, typename _EncodeErrorHandler, typename _DecodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _Intermediate, typename _FromState>
constexpr auto propagate_recode_encode_error_with(_Input &&__input, _Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, encode_result<_ResultInput, _Intermediate, _FromState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _DecodeErrorHandler &&__decode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __encode_error_handler, and __decode_error_handler and launders the ztd::text::encode_result through the __encode_error_handler. The transformed encode result is then transformed to a ztd::text::decode_result before transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact recode result type to use.

Parameters:
  • __input – [in] The input view to be reading from.

  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __result – [in] The result value that has an error in it.

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __decode_error_handler – [in] The error handler to mill the __encode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the recode operation.

  • __from_input_progress – [in] Any unread input characters in any intermediate between the (failed) encode and decode operations.

  • __from_output_progress – [in] Any unread intermediate output characters in any intermediates between the (failed) encode and decode operations.

  • __to_input_progress – [in] Any unread intermediate input characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _Input, typename _Output, typename _FromEncoding, typename _ToEncoding, typename _EncodeErrorHandler, typename _DecodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultIntermediate, typename _FromState>
constexpr auto propagate_recode_encode_error_with(_Input &&__input, _Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, encode_result<_ResultInput, _ResultIntermediate, _FromState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _DecodeErrorHandler &&__decode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __encode_error_handler, and __decode_error_handler and launders the ztd::text::encode_result through the __encode_error_handler. The transformed encode result is then transformed to a ztd::text::decode_result before transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact recode result type to use.

Parameters:
  • __input – [in] The input view to be reading from.

  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __result – [in] The result value that has an error in it.

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __decode_error_handler – [in] The error handler to mill the __encode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the recode operation.

  • __from_input_progress – [in] Any unread input characters in any intermediate between the (failed) encode and decode operations.

  • __from_output_progress – [in] Any unread intermediate output characters in any intermediates between the (failed) encode and decode operations.

  • __to_input_progress – [in] Any unread intermediate input characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _Result, typename _Input, typename _ToEncoding, typename _DecodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_recode_decode_error_with(_Input &&__input, _ToEncoding &&__to_encoding, encode_result<_ResultInput, _ResultPivot, _FromState> &&__encode_result, decode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __to_encoding and __decode_error_handler and launders the failed ztd::text::encode_result through it, producing a ztd::text::decode_result and transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact recode result type to use.

Parameters:
  • __input – [in] The input view to be read from.

  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __encode_result – [in] The result value that has an error on it.

  • __decode_result – [in] The result value that has an error on it.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the recode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _Input, typename _ToEncoding, typename _DecodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_recode_decode_error_with(_Input &&__input, _ToEncoding &&__to_encoding, encode_result<_ResultInput, _ResultPivot, _FromState> &&__encode_result, decode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Takes the given __to_encoding and __decode_error_handler and launders the failed ztd::text::encode_result through it, producing a ztd::text::decode_result and transforming that into the desired ztd::text::recode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by recode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::recode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side. Unlike it’s counterpart, this function does not take an _Result template parameter and instead deduces the returned recode result type from inputs.

Parameters:
  • __input – [in] The input view to be read from.

  • __to_encoding – [in] The desired encoding that performs the decode portion of the transcoding step.

  • __encode_result – [in] The result value that has an error on it.

  • __decode_result – [in] The result value that has an error on it.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the recode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) encode and decode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) encode and decode operations.

template<typename _Result, typename _Output, typename _FromEncoding, typename _ToEncoding, typename _DecodeErrorHandler, typename _EncodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _Intermediate, typename _FromState>
constexpr auto propagate_transcode_decode_error(_Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, decode_result<_ResultInput, _Intermediate, _FromState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _EncodeErrorHandler &&__encode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __decode_error_handler, and __encode_error_handler and launders the ztd::text::decode_result through the __decode_error_handler. The transformed decode result is then transformed to a ztd::text::encode_result before transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact transcode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __result – [in] The result value that has an error in it.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __encode_error_handler – [in] The error handler to mill the __decode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __from_input_progress – [in] Any unread input characters in any intermediate between the (failed) encode and decode operations.

  • __from_output_progress – [in] Any unread intermediate output characters in any intermediates between the (failed) encode and decode operations.

  • __to_input_progress – [in] Any unread intermediate input characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.

template<typename _Output, typename _FromEncoding, typename _ToEncoding, typename _DecodeErrorHandler, typename _EncodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultIntermediate, typename _FromState>
constexpr auto propagate_transcode_decode_error(_Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, decode_result<_ResultInput, _ResultIntermediate, _FromState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _EncodeErrorHandler &&__encode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __decode_error_handler, and __encode_error_handler and launders the ztd::text::decode_result through the __decode_error_handler. The transformed decode result is then transformed to a ztd::text::encode_result before transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact transcode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __result – [in] The result value that has an error in it.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __encode_error_handler – [in] The error handler to mill the __decode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.

template<typename _Result, typename _ToEncoding, typename _EncodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_transcode_encode_error(_ToEncoding &&__to_encoding, decode_result<_ResultInput, _ResultPivot, _FromState> &&__decode_result, encode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __to_encoding and __encode_error_handler and launders the failed ztd::text::decode_result through it, producing a ztd::text::encode_result and transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact transcode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __result – [in] The result value that has an error on it.

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.

template<typename _ToEncoding, typename _EncodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_transcode_encode_error(_ToEncoding &&__to_encoding, decode_result<_ResultInput, _ResultPivot, _FromState> &&__decode_result, encode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Takes the given __to_encoding and __encode_error_handler and launders the failed ztd::text::decode_result through it, producing a ztd::text::encode_result and transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side. Unlike it’s counterpart, this function does not take an _Result template parameter and instead deduces the returned transcode result type from inputs.

Parameters:
  • __output – [in] The output view to be writing into.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __decode_result – [in] The decode result value that has an error on it.

  • __encode_result – [in] The encode result value that represents what the next step would be if the decode did not work.

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.

template<typename _Result, typename _Input, typename _Output, typename _FromEncoding, typename _ToEncoding, typename _DecodeErrorHandler, typename _EncodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _Intermediate, typename _FromState>
constexpr auto propagate_transcode_decode_error_with(_Input &&__input, _Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, decode_result<_ResultInput, _Intermediate, _FromState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _EncodeErrorHandler &&__encode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __decode_error_handler, and __encode_error_handler and launders the ztd::text::decode_result through the __decode_error_handler. The transformed decode result is then transformed to a ztd::text::encode_result before transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact transcode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __decode_result – [in] The decode result value that has an error on it.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __encode_error_handler – [in] The error handler to mill the __decode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.

template<typename _Input, typename _Output, typename _FromEncoding, typename _ToEncoding, typename _DecodeErrorHandler, typename _EncodeErrorHandler, typename _ToState, typename _FromInputProgress, typename _FromOutputProgress, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultIntermediate, typename _FromState>
constexpr auto propagate_transcode_decode_error_with(_Input &&__input, _Output &&__output, _FromEncoding &&__from_encoding, _ToEncoding &&__to_encoding, decode_result<_ResultInput, _ResultIntermediate, _FromState> &&__decode_result, _DecodeErrorHandler &&__decode_error_handler, _EncodeErrorHandler &&__encode_error_handler, _ToState &__to_state, _FromInputProgress &&__from_input_progress, _FromOutputProgress &&__from_output_progress, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __from_encoding, __to_encoding, __decode_error_handler, and __encode_error_handler and launders the ztd::text::decode_result through the __decode_error_handler. The transformed decode result is then transformed to a ztd::text::encode_result before transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact transcode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __from_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __decode_result – [in] The decode result value that has an error on it.

  • __decode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __encode_error_handler – [in] The error handler to mill the __decode_error_handler’s invoked result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.

template<typename _Result, typename _Input, typename _ToEncoding, typename _EncodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_transcode_encode_error_with(_Input &&__input, _ToEncoding &&__to_encoding, decode_result<_ResultInput, _ResultPivot, _FromState> &&__decode_result, encode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Transcoding helper. Takes the given __to_encoding and __encode_error_handler and launders the failed ztd::text::decode_result through it, producing a ztd::text::encode_result and transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side.

Template Parameters:

_Result – The exact transcode result type to use.

Parameters:
  • __output – [in] The output view to be writing into.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __decode_result – [in] The decode result value that has an error on it.

  • __encode_result – [in] The encode result value that represents .

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.

template<typename _Input, typename _ToEncoding, typename _EncodeErrorHandler, typename _ToInputProgress, typename _ToOutputProgress, typename _ResultInput, typename _ResultPivot, typename _FromState, typename _ResultIntermediate, typename _ResultOutput, typename _ToState>
constexpr auto propagate_transcode_encode_error_with(_Input &&__input, _ToEncoding &&__to_encoding, decode_result<_ResultInput, _ResultPivot, _FromState> &&__decode_result, encode_result<_ResultIntermediate, _ResultOutput, _ToState> &&__encode_result, _EncodeErrorHandler &&__encode_error_handler, _ToInputProgress &&__to_input_progress, _ToOutputProgress &&__to_output_progress) noexcept

Takes the given __to_encoding and __encode_error_handler and launders the failed ztd::text::decode_result through it, producing a ztd::text::encode_result and transforming that into the desired ztd::text::transcode_result type.

Remark

This function is a helper whose sole purpose is to ensure that the other half of error handling is called by transcode-style functions written by the end user (e.g., writing overriding hooks for ztd::text::transcode). This function attempts to take care of any unread/unwritten characters and other minor points in its pursuit of properly making sure the error manifests on the other side. Unlike it’s counterpart, this function does not take an _Result template parameter and instead deduces the returned transcode result type from inputs.

Parameters:
  • __output – [in] The input view to be reading from.

  • __output – [in] The output view to be writing into.

  • __to_encoding – [in] The desired encoding that performs the encode portion of the transcoding step.

  • __decode_result – [in] The decode result value that has an error on it.

  • __encode_result – [in] The encode result value that represents .

  • __encode_error_handler – [in] The error handler to mill the __result and other relevant information through.

  • __to_state – [in] The current state of the encoding step of the transcode operation.

  • __to_input_progress – [in] Any unread output characters in any intermediate between the (failed) decode and encode operations.

  • __to_output_progress – [in] Any unread output characters in any intermediates between the (failed) decode and encode operations.