my c-Structure does not have a destructor.
Firstly, no . Your structure actually has a destructor - an implicitly declared destructor .
In any case, release it.
delete pointer;
When compiling this code, we must call the *pointer destructor. However, if *pointer is an incomplete type, we cannot know the destructor to call. In this case, the standard [expr.delete] says that it invokes undefined behavior.
If the deleted object has an incomplete class type at the delete point, and the full class has a nontrivial destructor or release function, the behavior is undefined.
As you can see, if your structure does not have a non-trivial destructor or a class-specific operator delete function, this is not UB. However, you can probably add a destructor to your structure - you will . If you do this without correcting this moment, it will truly be a mistake. (The compiler should not report this, it's just UB, not an illegal code.) Therefore, it is not considered good practice.
Because of this, removing incomplete types is something we should avoid. To avoid this, we use this trick.
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
Since sizeof(T) is illegal code if T is an incomplete type, so it can reduce compilation time before your program gets crazy due to UB.
I highly recommend you just turn it on, despite the slower smoothing speed; Although your structure is trivial and does not have an operator delete , you can add them without committing, which causes UB.