If I have something like:
// library 1:
struct A
{
struct B
{
std::map<std::string, int> LookupTable;
};
B b;
};
// library 2:
struct C
{
std::map<std::string, int> LookupTable;
};
How could one write something akin to the following, but that actually works?
// 1
static_assert(typeof(A::B::LookupTable) == typeof(C::LookupTable));
// 2
static_assert(typeof(A::B::LookupTable) == typeof(map<std::string, int>));
// 3
A a;
static_assert(typeof(a.x) == typeof(map<std::string, int>));
The typeof
and typeid
operators obviously don't suit the problem.