onnxruntime
4387b06d - Log filesystem path instead of string for C++20 compliance (#26745)

Commit
53 days ago
Log filesystem path instead of string for C++20 compliance (#26745) ### Description Log the `std::filesystem::path` object instead of the `ORTCHAR_T` string to avoid C++20 compliance issues. ### Motivation and Context `ORTCHAR_T` is a `wchar_t` on Windows and it is not allowed to pass that to `std::basic_ostream`. <details> <summary>Example</summary> ([example.cpp](https://godbolt.org/z/1W4K6ojrY)) ```C++ #include <iostream> #include <filesystem> int main() { const wchar_t* s = L"my/path"; std::filesystem::path path(s); std::cout << s << std::endl; return 0; } ``` Output on latest MSVC with `/std:c++20`: ``` <source>(8): error C2280: 'std::basic_ostream<char,std::char_traits<char>> &std::operator <<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char>> &,const wchar_t *)': attempting to reference a deleted function Z:\compilers\msvc\14.44.35207-14.44.35219.0\include\__msvc_ostream.hpp(972): note: see declaration of 'std::operator <<' <source>(8): error C2088: built-in operator '<<' cannot be applied to an operand of type 'std::ostream' ``` </details>
Author
Parents
Loading