Carlos =?utf-8?q?Gálvez?= <carlos.gal...@zenseact.com>

https://github.com/PiotrZSL commented:

Maybe:

```
Identifies unimplemented private special member functions, recommends using '= 
delete' for them, and suggests relocating such deleted functions from the 
private to the public section.

Before the introduction of C++11, the primary method to effectively "erase" a 
particular function involved declaring it as private without providing a 
definition. This approach would result in either a compiler error (when 
attempting to call a private function) or a linker error (due to an undefined 
reference).

However, subsequent to the advent of C++11, a more conventional approach 
emerged for achieving this purpose. It involves flagging functions as "= 
delete" and retaining them within the public section of the code.

To prevent false positives, this check is only applicable within a translation 
unit where all other member functions have been implemented. The check will 
generate partial fixes by introducing "= delete," but the user is responsible 
for manually relocating it to the public section.
```

https://github.com/llvm/llvm-project/pull/65231
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to