Skip to content

STYLE: C++11 inheriting constructors and Rule of Zero for ExceptionObject derived classes#2398

Merged
dzenanz merged 2 commits intoInsightSoftwareConsortium:masterfrom
N-Dekker:inheriting-constructors-from-ExceptionObject
Mar 12, 2021
Merged

STYLE: C++11 inheriting constructors and Rule of Zero for ExceptionObject derived classes#2398
dzenanz merged 2 commits intoInsightSoftwareConsortium:masterfrom
N-Dekker:inheriting-constructors-from-ExceptionObject

Conversation

@N-Dekker
Copy link
Copy Markdown
Contributor

@N-Dekker N-Dekker commented Mar 11, 2021

MemoryAllocationError, RangeError, InvalidArgumentError, and
IncompatibleOperandsError may simply inherit the constructors from
their base class, itk::ExceptionObject.

`MemoryAllocationError`, `RangeError`, `InvalidArgumentError`, and
`IncompatibleOperandsError` may simply inherit the constructors from
their base class, `itk::ExceptionObject`.
Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@N-Dekker N-Dekker marked this pull request as ready for review March 11, 2021 20:07
Removed the explicit declaration and definition of destructors from the
derived exception classes defined in "itkExceptionObject.h", following
the C++ "Rule of Zero".
@N-Dekker N-Dekker marked this pull request as draft March 12, 2021 11:07
@N-Dekker N-Dekker changed the title STYLE: C++11 inheriting constructors from ExceptionObject for 4 classes STYLE: C++11 inheriting constructors and Rule of Zero for ExceptionObject derived classes Mar 12, 2021
@N-Dekker N-Dekker requested a review from dzenanz March 12, 2021 11:13
@N-Dekker N-Dekker marked this pull request as ready for review March 12, 2021 11:13
@N-Dekker
Copy link
Copy Markdown
Contributor Author

FYI Added an extra commit, which removes the explicit destructor declarations and definitions from those classes.

@dzenanz dzenanz merged commit 79cf5c0 into InsightSoftwareConsortium:master Mar 12, 2021
N-Dekker added a commit to N-Dekker/ITK that referenced this pull request Mar 14, 2021
Follow-up to:
Pull request InsightSoftwareConsortium#2398
Commit e41b2ef
"STYLE: C++11 inheriting constructors from ExceptionObject for 4 classes"
dzenanz pushed a commit that referenced this pull request Mar 15, 2021
Follow-up to:
Pull request #2398
Commit e41b2ef
"STYLE: C++11 inheriting constructors from ExceptionObject for 4 classes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants