Код: Выделить всё
int main() {
struct {
using ThisType = ???? //what do i put here?
} _; // the instance
}
Код: Выделить всё
template
struct get_class;
template
struct get_class{using type = Class;};
int main(){
struct {
void getThis(){}
using ThisType = typename get_class::type; // error cant know which function to call to determine
// i tried to static_cast but I need to know the class type still.
} _;
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... -unnamed-c