Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Base
- {
- virtual json serialize() const = 0;
- };
- template <typename T>
- struct BaseCRTP : Base
- {
- json serialize() const override { return meta::serialize(static_cast<const T&>(*this)); }
- };
- struct Hero : BaseCRTP<Hero>
- {
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement