Skip to content

Commit

Permalink
COMP: Work around GCC <= 9.1 "error: invalid application of ‘sizeof’..."
Browse files Browse the repository at this point in the history
Worked around a GCC bug which produced the following error:

> unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type

The issue #3643
"Compilation fails with GCC 8.4." was reported by Max Aehle. The GCC bug appears
to be fixed with GCC 9.2.

The workaround (removing "`{ nullptr }`") was also suggested by Max Aehle.
  • Loading branch information
N-Dekker committed Sep 21, 2022
1 parent 171fb2b commit d7c0128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class ITKCommon_EXPORT Object : public LightObject

/** Implementation class for Subject/Observer Pattern.
* This is only allocated if used. */
std::unique_ptr<SubjectImplementation> m_SubjectImplementation{ nullptr };
std::unique_ptr<SubjectImplementation> m_SubjectImplementation;

/**
* Implementation for holding Object MetaData
Expand Down

0 comments on commit d7c0128

Please sign in to comment.