...

/

NSDMI: Advantages and Disadvantages

NSDMI: Advantages and Disadvantages

Let's summarize non-static data member initialization.

Advantages of NSDMI

It looks like using NSDMI is a clear winner for Modern C++. Here are the main reasons why is it so helpful:

  • It’s easy to write.
  • You can be sure that each member is initialized correctly.
    • The declaration and the default value are in
...