判断空类
1 2 3 4 5 6 7 8 9 10 11 12 13 |
template<typename T> struct EmptyHelper : T{ int group[256]; } struct EmptyHelper{ int group[256]; } template<typename T> bool isEmptyClass(){ return sizeof(EmptyHelper2) == sizeof(EmptyHelper<T>); } |
本文为原创文章,版权归Aet所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ 2020_04_2804/28
- ♥ 2022_03_0103/01
- ♥ 2023_02_1502/20
- ♥ 2022_02_24_0203/01
- ♥ 2022_02_2602/26
- ♥ 2020_05_11_0105/14