MCPcopy Create free account
hub / github.com/boostorg/filesystem / do_out

Method do_out

src/windows_file_codecvt.cpp:47–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47std::codecvt_base::result windows_file_codecvt::do_out(
48 std::mbstate_t&,
49 const wchar_t* from, const wchar_t* from_end, const wchar_t*& from_next,
50 char* to, char* to_end, char*& to_next) const
51{
52 UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
53
54 int count;
55 if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from, static_cast< int >(from_end - from), to, static_cast< int >(to_end - to), 0, 0)) == 0)
56 {
57 return error; // conversion failed
58 }
59
60 from_next = from_end;
61 to_next = to + count;
62 *to_next = '\0';
63 return ok;
64}
65
66} // namespace detail
67} // namespace filesystem

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected