-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building for Windows using C++20 #7841
Conversation
Pull Request Test Coverage Report for Build kenneth.geisshirt_16Details
💛 - Coveralls |
53a760d
to
459ef83
Compare
Pull Request Test Coverage Report for Build kenneth.geisshirt_18Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build kenneth.geisshirt_19Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are officially supporting C++20, then we should have a CI runner that checks for compile errors so that we don't accidentally regress.
} | ||
inline auto u8path(const std::string& str) | ||
{ | ||
return std::filesystem::path(reinterpret_cast<const char8_t*>(str.c_str())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit concerned that this converts using the constructor that terminates at the first null byte, regardless of the length of the original string. But I suppose this is not actually a problem because null bytes cannot be in a file path.
6c5cebf
to
e923527
Compare
@ironage I tried to get it to compile on |
e923527
to
997f636
Compare
Pull Request Test Coverage Report for Build kenneth.geisshirt_25Details
💛 - Coveralls |
edc77ab
to
aedf6d3
Compare
Trying to get it to build on Windows also failed (works on my machine) |
Pull Request Test Coverage Report for Build kenneth.geisshirt_28Details
💛 - Coveralls |
Building with |
aedf6d3
to
ade465f
Compare
Pull Request Test Coverage Report for Build kenneth.geisshirt_30Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Tried running the Dart test suite with this commit with set(CMAKE_CXX_STANDARD 20) without any hickups.
Builds for node.js for Windows: realm/realm-js#6739 |
What, How & Why?
This PR tries to address the following:
requires
which is new keyword in C++20: node template and jsi templateu8string()
on Windows, and signature has changed between C++17 and C++20 with the implication that Core only supports C++17 on Windows☑️ ToDos
[ ] C-API, if public C++ API changed[ ]bindgen/spec.yml
, if public C++ API changed