File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
polymorphism/include/polymorphism Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ class Impl
14
14
std::string s_ { " <default value>" }; // with default member initializer (C++11)
15
15
16
16
public:
17
- std::string coolFeature () const override { return s_; }
18
- void set (std::string s) override
17
+ std::string coolFeature () const noexcept override { return s_; }
18
+ void set (std::string s) noexcept override
19
19
{
20
20
s_ = std::move (s);
21
21
}
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ class Impl {
12
12
std::string s_ { " <default value>" }; // with default member initializer (C++11)
13
13
14
14
public:
15
- std::string coolFeature () const { return s_; }
16
- void set (std::string s)
15
+ std::string coolFeature () const noexcept { return s_; }
16
+ void set (std::string s) noexcept
17
17
{
18
18
s_ = std::move (s);
19
19
}
You can’t perform that action at this time.
0 commit comments