January 2018
Intermediate to advanced
374 pages
9h 53m
English
Now that we have a mechanism to write bulk functions using reflection rather than manually typing each variable, we still need to type the simplified bulk functions for every type. What if we wanted these functions to be generated for every type which is reflectable?
In other words, every type which has the reflect() member function should also have operator==, operator< and the global std::stream& operator. First of all, operator== and operator< need to be moved from being member functions to global functions; fortunately C++ allows these functions to be member functions or global functions.
Secondly, in order to enable these functions only for classes that have a reflect() member function, we need ...
Read now
Unlock full access