Here is a minimal example: foo<incomplete_type> f; will cause error because it will do sizeof with type, even though incomplete_type is not a arithmetic type(iow, it will not go into sizeof branch logically). live demo
Consider this simplified and very specific implementation of a recursive variant on top of std::variant:
I have got the following code:The IDE gives an errorBut if I use void paiming1(struct student_info *student); it works OK. Why is that? I am using GCC.