If there is no failure ec remains unchanged (not cleared).
win32_unicode_path(const char* utf8_path, error_code& ec) {
int ret = mb2wide(utf8_path, static_buf_.data(),
static_buf_.size());
if (ret == 0)
{
int sz = mb2wide(utf8_path, nullptr, 0);
if (sz == 0)
{
ec.assign(boost::winapi::GetLastError(),
system_category());
return;
}
dynamic_buf_.resize(sz);
int ret2 = mb2wide(utf8_path,
dynamic_buf_.data(),
dynamic_buf_.size());
if (ret2 == 0)
{
ec.assign(boost::winapi::GetLastError(),
system_category());
return;
}
}
}
https://github.com/boostorg/beast/blob/develop/include/boost/beast/core/detail/win32_unicode_path.hpp#L31-L54
If there is no failure ec remains unchanged (not cleared).
https://github.com/boostorg/beast/blob/develop/include/boost/beast/core/detail/win32_unicode_path.hpp#L31-L54