-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade the build to require C++20 #178
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
base: master
Are you sure you want to change the base?
Changes from all commits
434c926
e76f02a
e7a1474
2f068a9
1e5ce62
bfced74
0f30839
de11730
f0603a6
1fcc1fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,9 @@ | |
| struct NODISCARD ExitFields final : public ExitFieldsGetters<ExitFields>, | ||
| public ExitFieldsSetters<ExitFields> | ||
| { | ||
| public: | ||
| ExitFields() {} | ||
|
Comment on lines
+11
to
+12
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. suggestion: Use a defaulted constructor instead of an empty user-provided one to preserve triviality/constexpr properties An empty |
||
|
|
||
| public: | ||
| #define X_DECL_FIELD(_Type, _Prop, _OptInit) _Type _Prop _OptInit; | ||
| XFOREACH_EXIT_PROPERTY(X_DECL_FIELD) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,9 @@ template<typename Tag_> | |
| struct NODISCARD TaggedRawExit final : public ExitFieldsGetters<TaggedRawExit<Tag_>>, | ||
| public ExitFieldsSetters<TaggedRawExit<Tag_>> | ||
| { | ||
| public: | ||
| TaggedRawExit() {} | ||
|
Comment on lines
+16
to
+17
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. suggestion: Prefer An empty-bodied default constructor makes the type’s ctor user-provided, which can change triviality and related type traits. If you only need a default ctor with no custom logic, prefer Suggested implementation: struct NODISCARD ExitFields final : public ExitFieldsGetters<ExitFields>,
public ExitFieldsSetters<ExitFields>
{
+public:
+ ExitFields() = default;
+There is a similar pattern in the same file for public:
TaggedRawExit() {}If the same rationale applies (preserving triviality and related traits), consider changing this to |
||
|
|
||
| public: | ||
| using IdType = std::conditional_t< | ||
| std::is_same_v<Tag_, ::tags::RoomIdTag>, | ||
|
|
||
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.
issue (bug_risk): Align hash implementations for u32string and u32string_view to guarantee consistency
For transparent lookup,
Pred(a, b)being true must implyHash(a) == Hash(b). Relying onstd::hash<std::u32string>for one overload andstd::hash<std::u32string_view>for the other assumes the library uses compatible implementations, which is not guaranteed. Please route both overloads through a single hasher (e.g. always hash astd::u32string_view) to ensure consistency.