Skip to content
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

Merged
merged 34 commits into from
Dec 15, 2019

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Dec 14, 2019

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.

template<typename T>
struct has_templated_read_message<
T, std::void_t<decltype(&T::template ReadFromMessage<>)>>
: std::true_type {};
Copy link
Member

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?

Copy link
Member Author

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.

@eggrobin eggrobin added the LGTM label Dec 15, 2019
@pleroy pleroy merged commit bac92d0 into mockingbirdnest:master Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants