Closed
Bug 1890930
Opened 2 years ago
Closed 2 years ago
[clang-trunk] nsExceptionHandler.cpp:2799:19: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream<char>')
Categories
(Toolkit :: Crash Reporting, defect)
Toolkit
Crash Reporting
Tracking
()
RESOLVED
FIXED
127 Branch
| Tracking | Status | |
|---|---|---|
| firefox127 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
[task 2024-04-10T23:43:19.925Z] 23:43:19 ERROR - /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2799:19: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream<char>')
[task 2024-04-10T23:43:19.926Z] 23:43:19 INFO - 2799 | std::ifstream file(*file_path);
[task 2024-04-10T23:43:19.926Z] 23:43:19 INFO - | ^ ~~~~~~~~~~
[task 2024-04-10T23:43:19.927Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/__fwd/fstream.h:24:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'const ifstream' for 1st argument
[task 2024-04-10T23:43:19.927Z] 23:43:19 INFO - 24 | class _LIBCPP_TEMPLATE_VIS basic_ifstream;
[task 2024-04-10T23:43:19.928Z] 23:43:19 INFO - | ^~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.928Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1100:34: note: candidate constructor not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'const char *' for 1st argument
[task 2024-04-10T23:43:19.929Z] 23:43:19 INFO - 1100 | _LIBCPP_HIDE_FROM_ABI explicit basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in);
[task 2024-04-10T23:43:19.929Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.930Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1102:34: note: candidate constructor not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'const wchar_t *' for 1st argument
[task 2024-04-10T23:43:19.930Z] 23:43:19 INFO - 1102 | _LIBCPP_HIDE_FROM_ABI explicit basic_ifstream(const wchar_t* __s, ios_base::openmode __mode = ios_base::in);
[task 2024-04-10T23:43:19.930Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.930Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1104:34: note: candidate constructor not viable: no known conversion from 'basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t>>' to 'const basic_string<char, char_traits<char>, allocator<char>>' for 1st argument
[task 2024-04-10T23:43:19.932Z] 23:43:19 INFO - 1104 | _LIBCPP_HIDE_FROM_ABI explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in);
[task 2024-04-10T23:43:19.932Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.932Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1111:25: note: candidate constructor not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'ifstream' for 1st argument
[task 2024-04-10T23:43:19.932Z] 23:43:19 INFO - 1111 | _LIBCPP_HIDE_FROM_ABI basic_ifstream(basic_ifstream&& __rhs);
[task 2024-04-10T23:43:19.932Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1107:74: note: candidate template ignored: requirement 'is_same_v<std::wstring, std::filesystem::path>' was not satisfied [with _Tp = value_type]
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - 1107 | _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_HIDE_FROM_ABI explicit basic_ifstream(
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - | ^
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1099:25: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - 1099 | _LIBCPP_HIDE_FROM_ABI basic_ifstream();
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - | ^
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - In file included from Unified_cpp_crashreporter0.cpp:11:
[task 2024-04-10T23:43:19.933Z] 23:43:19 ERROR - /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2805:19: error: no matching constructor for initialization of 'std::ofstream' (aka 'basic_ofstream<char>')
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - 2805 | std::ofstream file(*file_path);
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - | ^ ~~~~~~~~~~
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/__fwd/fstream.h:26:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'const ofstream' for 1st argument
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - 26 | class _LIBCPP_TEMPLATE_VIS basic_ofstream;
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - | ^~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.933Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1254:34: note: candidate constructor not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'const char *' for 1st argument
[task 2024-04-10T23:43:19.934Z] 23:43:19 INFO - 1254 | _LIBCPP_HIDE_FROM_ABI explicit basic_ofstream(const char* __s, ios_base::openmode __mode = ios_base::out);
[task 2024-04-10T23:43:19.934Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.934Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1256:34: note: candidate constructor not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'const wchar_t *' for 1st argument
[task 2024-04-10T23:43:19.935Z] 23:43:19 INFO - 1256 | _LIBCPP_HIDE_FROM_ABI explicit basic_ofstream(const wchar_t* __s, ios_base::openmode __mode = ios_base::out);
[task 2024-04-10T23:43:19.935Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.935Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1258:34: note: candidate constructor not viable: no known conversion from 'basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t>>' to 'const basic_string<char, char_traits<char>, allocator<char>>' for 1st argument
[task 2024-04-10T23:43:19.936Z] 23:43:19 INFO - 1258 | _LIBCPP_HIDE_FROM_ABI explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out);
[task 2024-04-10T23:43:19.936Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.936Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1267:25: note: candidate constructor not viable: no known conversion from 'value_type' (aka 'std::wstring') to 'ofstream' for 1st argument
[task 2024-04-10T23:43:19.937Z] 23:43:19 INFO - 1267 | _LIBCPP_HIDE_FROM_ABI basic_ofstream(basic_ofstream&& __rhs);
[task 2024-04-10T23:43:19.937Z] 23:43:19 INFO - | ^ ~~~~~~~~~~~~~~~~~~~~~~
[task 2024-04-10T23:43:19.938Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1262:74: note: candidate template ignored: requirement 'is_same_v<std::wstring, std::filesystem::path>' was not satisfied [with _Tp = value_type]
[task 2024-04-10T23:43:19.938Z] 23:43:19 INFO - 1262 | _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_HIDE_FROM_ABI explicit basic_ofstream(
[task 2024-04-10T23:43:19.939Z] 23:43:19 INFO - | ^
[task 2024-04-10T23:43:19.939Z] 23:43:19 INFO - /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/c++/v1/fstream:1253:25: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
[task 2024-04-10T23:43:19.939Z] 23:43:19 INFO - 1253 | _LIBCPP_HIDE_FROM_ABI basic_ofstream();
[task 2024-04-10T23:43:19.939Z] 23:43:19 INFO - | ^
[task 2024-04-10T23:43:19.939Z] 23:43:19 INFO - In file included from Unified_cpp_crashreporter0.cpp:11:
[task 2024-04-10T23:43:19.939Z] 23:43:19 WARNING - /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:3730:11: warning: unknown action 'executable' for '#pragma section' - ignored [-Wignored-pragmas]
[task 2024-04-10T23:43:19.940Z] 23:43:19 INFO - 3730 | # pragma section("mozwerpt", read, executable, shared)
[task 2024-04-10T23:43:19.940Z] 23:43:19 INFO - | ^
[task 2024-04-10T23:43:19.941Z] 23:43:19 INFO - 5 warnings and 2 errors generated.
The issue here is that libc++ removed support for implicit conversion from std::wstring, per https://cplusplus.github.io/LWG/issue3430
| Assignee | ||
Comment 1•2 years ago
|
||
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/30d1890a8dcb
Initialize fstreams from a std::filesystem::path on Windows. r=gsvelto
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox127:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•