CppCoreGuidelines icon indicating copy to clipboard operation
CppCoreGuidelines copied to clipboard

E.16 not noexcept copy constructor

Open NihilityT opened this issue 2 years ago • 1 comments

These two sentences appear to contradict each other in the bottom Note of E.16:

ensure its copy constructor is not noexcept.

Try not to throw a type whose copy constructor is not noexcept.

According to proposal #1921, perhaps here is:

ensure its copy constructor is noexcept.

NihilityT avatar Sep 11 '23 17:09 NihilityT

Although the wording in the logic might be convoluted, the two sentences agree on an exception type, or a type to throw, having a noexcept copy constructor.

iglesias avatar Mar 12 '24 06:03 iglesias