VK
Size: a a a
VK
VK
ПК
IZ
IZ
VK
VK
IK
IK
ПК
CD
AT
ПК
CD
ПК
IZ
IK
ПК
template <typename T>
trait_for_cpp_struct;
#define DEFINE_TYPE(T) \
struct my_c_struct_##T {\
int i;\
T custom;\
};\
\
template <>\
trait_for_cpp_struct<T> {\
using type = my_c_struct_##T;\
};\
DEFINE_TYPE(int);
DEFINE_TYPE(double);
template <typename T>
using cpp_struct = typename trait_for_cpp_struct<T>::type;
my_c_struct_int*
my_c_struct_double*
cpp_struct<int> == my_c_struct_int
cpp_struct<double> == my_c_struct_double
my_c_struct_##TПК
AS
struct base {
Int* l;
Int n;
};
struct concrete_type {
struct base base;
int A;
};