Most constructors will never throw an exception as they typically just set internal data members. They should be marked noexcept. The two main reasons for this are:
Allows potential additional optimizations of the code
More explicit decorators/declarations for library functions
(most importantly) Removes the exceptional path from the constructor as a part of code coverage
Most constructors will never throw an exception as they typically just set internal data members. They should be marked noexcept. The two main reasons for this are: