-
Notifications
You must be signed in to change notification settings - Fork 69
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
Compile-time detection of non-serializable frames #2405
Conversation
template<typename T> | ||
struct has_templated_read_message< | ||
T, std::void_t<decltype(&T::template ReadFromMessage<>)>> | ||
: std::true_type {}; |
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.
has_templatized_read_from_message
; but really we need the template parameters to all be defaulted, i.e., used for SFINAE; so perhaps has_enabled_read_from_message
?
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.
Calling it has_sfinae_read_from_message
because that's what it is.
The litmus test is
apsides_test.cpp
, which uses a non-serializable frame and construct complex objects with it, and survived to tell the story.