-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Fix compilation under and enable C++20 #12658
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# CLI11 | ||
|
||
Taken from [release v1.9.0](https://github.com/CLIUtils/CLI11/releases/tag/v1.9.0), source commit | ||
[dd0d8e4](https://github.com/CLIUtils/CLI11/commit/dd0d8e4fe729e5b1110232c7a5c9566dad884686) | ||
|
||
Taken from [release v1.9.1](https://github.com/CLIUtils/CLI11/releases/tag/v1.9.1), source commit | ||
[5cb3efa](https://github.com/CLIUtils/CLI11/commit/5cb3efabce007c3a0230e4cc2e27da491c646b6c) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if there is a cgmanifest.json in the cli11 folder plz update it to match this commit |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
#include <sddl.h> | ||
#include <wil/token_helpers.h> | ||
|
||
static constexpr std::string_view Utf8Bom{ u8"\uFEFF" }; | ||
static constexpr std::string_view Utf8Bom{ "\xEF\xBB\xBF", 3 }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did we lose support for u8 literals? was that not a real c++ feature? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea what's the deal here? was this just a happy accident that the compiler would translate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a fallout from a breaking change in C++20 (source):
Breaking changes in the language; still no breaking ABI change in the STL. 🥲 |
||
static constexpr std::wstring_view UnpackagedSettingsFolderName{ L"Microsoft\\Windows Terminal\\" }; | ||
|
||
namespace winrt::Microsoft::Terminal::Settings::Model | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,7 @@ namespace til | |
template<class To, class From, std::enable_if_t<std::conjunction_v<std::bool_constant<sizeof(To) == sizeof(From)>, std::is_trivially_copyable<To>, std::is_trivially_copyable<From>>, int> = 0> | ||
[[nodiscard]] constexpr To bit_cast(const From& _Val) noexcept | ||
{ | ||
#ifdef __cpp_lib_bit_cast | ||
#warning "Replace til::bit_cast and __builtin_bit_cast with std::bit_cast" | ||
#endif | ||
// TODO: Replace til::bit_cast and __builtin_bit_cast with std::bit_cast | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you'd like me to I can create an issue for this. I left it as a code-TODO since I personally consider this not particularly noteworthy. (I considered doing it as part of this PR, but I didn't want to burden us any more than necessary.) |
||
return __builtin_bit_cast(To, _Val); | ||
} | ||
} |
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.
FYI In order to keep this PR compact I manually modified CLI11.hpp.
First I reformatted it with clang-format and then went through the file, reverting all irrelevant whitespace changes.
Without this basically the entire CLI11.hpp file would've been rewritten, since the original v1.9.0 uses a vastly different code format than the version we got.