Actions
Feature #4681
closedcode-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;
};
};
Actions