std::codecvt<InternT,ExternT,StateT>::unshift, do_unshift

Header: <locale>

  1. Public member function, calls the member function do_unshift of the most derived class.

# Declarations

public:
result unshift( StateT& state, ExternT* to, ExternT* to_end,
ExternT*& to_next ) const;
protected:
virtual result do_unshift( StateT& state, ExternT* to, ExternT* to_end,
ExternT*& to_next ) const;

# Return value

A value of type std::codecvt_base::result, indicating the success status as follows:

# Notes

This function is called by std::basic_filebuf::close() and in other situations when finalizing a state-dependent multibyte character sequence.

# Example

This section is incompleteReason: no example

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 305C++98std::codecvt<wchar_t, char, std::mbstate_t>::do_unshiftwas required not to write any characternot required
LWG 380C++98the meaning of returning partial was ‘more characters need tobe supplied to complete termination’, but no character is suppliedcorrected to indicatinginsufficient buffer space
LWG 381C++98state was not required to be valid, anderror is returned if state is invalidstate is required to be valid, andreturning error indicates an error
LWG 664C++98std::codecvt<char, char, std::mbstate_t>::do_unshiftwas required not to write any characternot required
LWG 665C++98std::codecvt<char, char, std::mbstate_t>::do_unshiftwas required to return noconvnot required

# See also