Skip to content

Commit

Permalink
COMP: Fix MSVC /permissive- error C2516: ... is not a legal base class
Browse files Browse the repository at this point in the history
Works around compile errors that appeared using Visual C++ compiler flag
`/permissive-` ("Conformance mode"), using either VS2019 or VS2022, saying:

> error C2516: 'ConstIterator': is not a legal base class
> error C2516: 'GlobalDataStruct': is not a legal base class

Originally reported by Astha, March 14, 2022, and further discussed at
"ITK build Error in itk::ShapedNeighborhoodIterator",
https://discourse.itk.org/t/itk-build-error-in-itk-shapedneighborhooditerator/4861
  • Loading branch information
N-Dekker authored and dzenanz committed Jan 4, 2023
1 parent a1f40a7 commit 687f51e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -179,7 +179,7 @@ class ITK_TEMPLATE_EXPORT ShapedNeighborhoodIterator
using typename Superclass::IndexValueType;

/** An iterator for the ShapedNeighborhood classes. */
struct Iterator : public ConstIterator
struct Iterator : public Superclass::ConstIterator
{
Iterator() = default;
Iterator(Self * s)
Expand Down
Expand Up @@ -128,8 +128,7 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetFunction

/** A global data type used to store values needed to compute the time step.
*/
using typename Superclass::GlobalDataStruct;
struct ShapePriorGlobalDataStruct : public GlobalDataStruct
struct ShapePriorGlobalDataStruct : public Superclass::GlobalDataStruct
{
ScalarValueType m_MaxShapePriorChange;
};
Expand Down

0 comments on commit 687f51e

Please sign in to comment.