1 .. title:: clang-tidy - modernize-use-default-member-init
3 modernize-use-default-member-init
4 =================================
6 This check converts constructors' member initializers into the new
7 default member initializers in C++11. Other member initializers that match the
8 default member initializer are removed. This can reduce repeated code or allow
14 A() : i(5), j(10.0) {}
15 A(int i) : i(i), j(10.0) {}
30 Only converts member initializers for built-in types, enums, and pointers.
31 The `readability-redundant-member-init` check will remove redundant member
32 initializers for classes.
37 .. option:: UseAssignment
39 If this option is set to `true` (default is `false`), the check will initialize
40 members with an assignment. For example:
51 .. option:: IgnoreMacros
53 If this option is set to `true` (default is `true`), the check will not warn
54 about members declared inside macros.