Skip to content

Commit 1fdc7d1

Browse files
committed
Don't use wstring for logger and exception message
MSVC cpp20 issue, attempting to reference a deleted function for std::operator <<
1 parent 5250e18 commit 1fdc7d1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

samples/cpp/hello_classification/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ int tmain(int argc, tchar* argv[]) {
2828

2929
// -------- Parsing and validation of input arguments --------
3030
if (argc != 4) {
31-
slog::info << "Usage : " << argv[0] << " <path_to_model> <path_to_image> <device_name>" << slog::endl;
31+
slog::info << "Usage : " << TSTRING2STRING(argv[0]) << " <path_to_model> <path_to_image> <device_name>"
32+
<< slog::endl;
3233
return EXIT_FAILURE;
3334
}
3435

src/frontends/tensorflow/src/variables_index.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ bool VariablesIndex::read_variables(std::ifstream& vi_stream, const std::wstring
228228
}
229229
if (m_mmap_enabled) {
230230
m_data_files[shard].mmap = load_mmap_object(fullPath);
231-
FRONT_END_GENERAL_CHECK(m_data_files[shard].mmap->data(), L"Variable index data cannot be mapped");
231+
FRONT_END_GENERAL_CHECK(m_data_files[shard].mmap->data(), "Variable index data cannot be mapped");
232232
} else {
233233
m_data_files[shard].stream = std::shared_ptr<std::ifstream>(
234234
new std::ifstream(fullPath.c_str(), std::ifstream::in | std::ifstream::binary));
235-
FRONT_END_GENERAL_CHECK(m_data_files[shard].stream->is_open(), L"Variable index data file does not exist");
235+
FRONT_END_GENERAL_CHECK(m_data_files[shard].stream->is_open(), "Variable index data file does not exist");
236236
}
237237
}
238238

0 commit comments

Comments
 (0)