philnik777 wrote:

> Is it more reasonable to have the bodies of the functions that matter start 
> with a `static_assert` on the completeness of the type?

That would basically be the other option: Add a `static_assert(sizeof(_Tp) >= 
0)` to every single function. That's much less ergonomic and significantly more 
error-prone though (and also has worse diagnostic messages). We'll probably do 
that if you don't want to take the attribute. For the library it'd be much 
nicer not having to do that though.

https://github.com/llvm/llvm-project/pull/211231
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to