blob: 5509a5414f8c5f338a4c803f8c57b0f0531c6c36 [file] [log] [blame]
.. title:: clang-tidy - modernize-use-equals-default
This check replaces default bodies of special member functions with ``=
default;``. The explicitly defaulted function declarations enable more
opportunities in optimization, because the compiler might treat explicitly
defaulted functions as trivial.
.. code-block:: c++
struct A {
A() {}
A::~A() {}
// becomes
struct A {
A() = default;
A::~A() = default;
.. note::
Move-constructor and move-assignment operator are not supported yet.
.. option:: IgnoreMacros
If set to `true`, the check will not give warnings inside macros. Default
is `true`.