struct __block_imp {
void *isa;
int flags;
int Reserved;
void *FuncPtr;
}
struct __main_block_imp_0 {
struct __block_imp impl;
struct __main_block_desc_0 *Desc;
__main_block_impl_0(void *fp, struct __main_block _desc_0 *desc, int flags = 0) {
impl.isa = &_NSConcreteStackBlock.
impl.Flags = flags;
impl.FuncPtr = fp;
Desc = desc
}
};
struct __main_block_desc_0 {
unsigned long reserved;
unsigned long Block_size;
} __main_block_desc_0_DATA = {
0,
sizeof(struct __main_block_impl_0)
};
void (*blk)(void) = (void(*)(void))&__main_block_impl_0 (
(void *)__mainblock_func_0, &__main_block_desc_0_DATA);
这个代码获取了 第二个结构体的构造函数地址,显式调用构造函数会临时产生变量,所以我自己写的demp试的时候,报错Taking the address of a temporary object of type .
可是它为什么就可以获取呢