mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
C.31: Improve language just a bit (#1772)
This commit is contained in:
@@ -4943,7 +4943,7 @@ For resources represented as classes with a complete set of default operations,
|
|||||||
|
|
||||||
##### Note
|
##### Note
|
||||||
|
|
||||||
What about a sockets that won't close? A destructor, close, or cleanup operation [should never fail](#Rc-dtor-fail).
|
What about a socket that won't close? A destructor, close, or cleanup operation [should never fail](#Rc-dtor-fail).
|
||||||
If it does nevertheless, we have a problem that has no really good solution.
|
If it does nevertheless, we have a problem that has no really good solution.
|
||||||
For starters, the writer of a destructor does not know why the destructor is called and cannot "refuse to act" by throwing an exception.
|
For starters, the writer of a destructor does not know why the destructor is called and cannot "refuse to act" by throwing an exception.
|
||||||
See [discussion](#Sd-never-fail).
|
See [discussion](#Sd-never-fail).
|
||||||
|
|||||||
Reference in New Issue
Block a user