This class helps us to detect convertibility and inheritance at compile time. To see whether U is same type as T we can call:. More...
#include <base.hpp>
Classes | |
class | big |
Static Public Attributes | |
static const bool | exists = (sizeof(small) == sizeof(test(makeT()))) |
static const bool | same_type = false |
static const bool | super_sub_class |
This class helps us to detect convertibility and inheritance at compile time. To see whether U is same type as T we can call:.
bool same = conversion<T, U>::same_type;
To see whether T is convertible to U we can call:
bool converitble = conversion<T, U>::exists;
To see whether T is super class of U we can call:
bool super_class = conversion<T, U>::super_sub_class;
const bool instigate::generic::conversion< T, U >::super_sub_class [static] |
conversion<const U*, const T*>::exists && !conversion<const T*, const void*>::same_type