Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- template<class...Operations>
- struct super_any {};
- auto print = make_any_method([](auto&& self, auto&& os){ os << self; });
- using printable_any = super_any<decltype(print)>;
- int main()
- {
- printable_any data = 12;
- (data->*print)(std::cout);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement