Feature #4681
code-style 2.24: update example with using base class constructor
Start date:
Due date:
% Done:
100%
Estimated time:
1.50 h
Description
rule 2.24 currently gives the following example:
#include <stdexcept> class Foo { class Error : public std::runtime_error { public: explicit Error(const std::string& what) : std::runtime_error(what) { } }; };
Since C++14, this can be simplified as:
#include <stdexcept> class Foo { class Error : public std::runtime_error { public: using std::runtime_error::runtime_error; }; };
Updated by Junxiao Shi over 2 years ago
- Status changed from New to Code review
- Assignee set to Junxiao Shi
- % Done changed from 0 to 100