In situations where you have a base and many derived classes, all of which encode a package of variables, something like the following
template<typename ... Args>
struct base
{};
template<typename ... Args>
struct derived_1: base <Args...>
{};
template<typename ... Args>
struct derived_2: base <Args...>
{};
How to check if objects of different derived classes were created using the same package. For example, given
derived_1<int,float,double> d1_obj;
derived_2<int,float,double> d2_obj;
I need a mechanism to tell me that both objects are equal, in the sense that they contain the same types in the same order.
source
share