mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Update CppCoreGuidelines.md
Destructors are always marked as noexcept (unless noexcept(false)) using this word here is ambigious.
This commit is contained in:
@@ -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
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user