Fixed compilation with C++17 on Windows (#19682)
This commit is contained in:
parent
ed230cd879
commit
8eb165021c
@ -12,10 +12,6 @@
|
|||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
|
|
||||||
# include <codecvt>
|
|
||||||
# include <locale>
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
# if defined(WINAPI_FAMILY) && !WINAPI_PARTITION_DESKTOP
|
# if defined(WINAPI_FAMILY) && !WINAPI_PARTITION_DESKTOP
|
||||||
# error "Only WINAPI_PARTITION_DESKTOP is supported, because of GetModuleHandleEx[A|W]"
|
# error "Only WINAPI_PARTITION_DESKTOP is supported, because of GetModuleHandleEx[A|W]"
|
||||||
|
@ -13,14 +13,10 @@
|
|||||||
#include "openvino/frontend/paddle/node_context.hpp"
|
#include "openvino/frontend/paddle/node_context.hpp"
|
||||||
#include "openvino/opsets/opset7.hpp"
|
#include "openvino/opsets/opset7.hpp"
|
||||||
#include "openvino/util/common_util.hpp"
|
#include "openvino/util/common_util.hpp"
|
||||||
|
#include "openvino/util/file_util.hpp"
|
||||||
#include "paddle_utils.hpp"
|
#include "paddle_utils.hpp"
|
||||||
#include "place.hpp"
|
#include "place.hpp"
|
||||||
|
|
||||||
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
|
||||||
# include <codecvt>
|
|
||||||
# include <locale>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ov {
|
namespace ov {
|
||||||
namespace frontend {
|
namespace frontend {
|
||||||
namespace paddle {
|
namespace paddle {
|
||||||
@ -169,9 +165,7 @@ std::basic_string<T> get_const_path(const std::basic_string<T>& folder_with_weig
|
|||||||
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||||
template <>
|
template <>
|
||||||
std::basic_string<wchar_t> get_const_path(const std::basic_string<wchar_t>& folder, const std::string& name) {
|
std::basic_string<wchar_t> get_const_path(const std::basic_string<wchar_t>& folder, const std::string& name) {
|
||||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
return folder + paddle::get_path_sep<wchar_t>() + ov::util::string_to_wstring(name);
|
||||||
std::wstring _name = converter.from_bytes(name);
|
|
||||||
return folder + paddle::get_path_sep<wchar_t>() + _name;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user