Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiler warning when a class breaks rule-of-three (five)

Is it possible to trigger compiler warning when a class breaks rule-of-three (or rule-of-five)?

This feature sounds easy to implement and is very useful in safety critical software but I can't find it anywhere in documentation or Google search results.

like image 774
JD. Avatar asked Dec 07 '16 11:12

JD.


1 Answers

You can use the compiler flag -Weffc++ for GCC

like image 182
Swapnil Avatar answered Sep 18 '22 02:09

Swapnil