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
Fixing serialization of classes with incompatible serialize signature #3156
Conversation
6b25fb4
to
3cff7c8
Compare
hpx/runtime/serialization/access.hpp
Outdated
struct two_chars | ||
{ | ||
char _[2]; | ||
}; |
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.
Can we use std::true_type
and std::false_type
here?
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.
Not that I can think of.
Do you mean to use std::true/false_type as the return types for the test functions? If so, I don't think it makes a big difference. If you mean to inherit from std::true/false_type, then see the related discussion in #3134 why it didn't work for gcc.
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.
Very nice, thank you so much!
@hkaiser thanks for letting me work on this! |
hpx/runtime/serialization/access.hpp
Outdated
|
||
public: | ||
static constexpr bool value = | ||
sizeof(test<T>(0)) == sizeof(two_chars); |
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.
related to the above discussion ... I was thinking of why for example value = decltype(test<T>(0))::value;
didn't work. It looks like this is unrelated to the discussion in #3134. If this is the only way to get it to work, there's nothing one can do, right?
0ab6e0e
to
241a985
Compare
@sithhell yeah, I agree. It does look better now. |
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.
Thanks, LGTM now!
This fixes #3134