mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Update CppCoreGuidelines.md
Destructors are always marked as noexcept (unless noexcept(false)) using this word here is ambigious.
This commit is contained in:
parent
572119b71d
commit
b8e9216bca
@ -12008,7 +12008,7 @@ Never allow an error to be reported from a destructor, a resource deallocation f
|
||||
class nefarious {
|
||||
public:
|
||||
nefarious() { /* code that could throw */ } // ok
|
||||
~nefarious() { /* code that could throw */ } // BAD, should be noexcept
|
||||
~nefarious() { /* code that could throw */ } // BAD, should not throw
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user