Skip to content

Commit

Permalink
ENH: replace usage of IsBaseOf by std::is_base_of
Browse files Browse the repository at this point in the history
  • Loading branch information
dzenanz committed Sep 13, 2021
1 parent e092a3d commit e90519e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Modules/Core/Common/include/itkVariableLengthVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <type_traits>
#include "itkNumericTraits.h"
#include "itkMetaProgrammingLibrary.h"
#include "itkIsBaseOf.h"
#include "itkIsNumber.h"
#include "itkPromoteType.h"
#include "itkBinaryOperationConcept.h"
Expand Down Expand Up @@ -1205,7 +1204,7 @@ struct VariableLengthVectorExpression
{
// Not neccessary actually as end-user/developer is not expected to
// provide new BinaryOperations
static_assert((itk::mpl::IsBaseOf<Details::op::BinaryOperationConcept, TBinaryOp>::Value),
static_assert(std::is_base_of<Details::op::BinaryOperationConcept, TBinaryOp>::value,
"The Binary Operation shall inherit from BinaryOperationConcept");
}

Expand Down
5 changes: 2 additions & 3 deletions Modules/Core/Common/include/itkVariableLengthVector.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "itkMath.h"
#include <cstring>
#include <cstdlib>
#include "itkIsBaseOf.h"
#include "itkMath.h"

namespace itk
Expand Down Expand Up @@ -292,10 +291,10 @@ void
VariableLengthVector<TValue>::SetSize(unsigned int sz, TReallocatePolicy reallocatePolicy, TKeepValuesPolicy keepValues)
{
static_assert(
(itk::mpl::IsBaseOf<AllocateRootPolicy, TReallocatePolicy>::Value),
std::is_base_of<AllocateRootPolicy, TReallocatePolicy>::value,
"The allocation policy does not inherit from itk::VariableLengthVector::AllocateRootPolicy as expected");
static_assert(
(itk::mpl::IsBaseOf<KeepValuesRootPolicy, TKeepValuesPolicy>::Value),
std::is_base_of<KeepValuesRootPolicy, TKeepValuesPolicy>::value,
"The old values keeping policy does not inherit from itk::VariableLengthVector::KeepValuesRootPolicy as expected");

if (reallocatePolicy(sz, m_NumElements) || !m_LetArrayManageMemory)
Expand Down

0 comments on commit e90519e

Please sign in to comment.