20
20
21
21
#include < cassert>
22
22
#include < algorithm>
23
+ #include < type_traits>
23
24
#include " itkNumericTraits.h"
24
25
#include " itkMetaProgrammingLibrary.h"
25
- #include " itkEnableIf.h"
26
26
#include " itkIsBaseOf.h"
27
27
#include " itkIsNumber.h"
28
28
#include " itkPromoteType.h"
@@ -1052,7 +1052,7 @@ struct GetType
1052
1052
* \sa \c VariableLengthVectorExpression
1053
1053
*/
1054
1054
template <typename TExpr1, typename TExpr2>
1055
- inline typename mpl::EnableIf <mpl::And<mpl::IsArray<TExpr1>, mpl::IsArray<TExpr2>>, unsigned int >::Type
1055
+ inline std:: enable_if_t <mpl::And<mpl::IsArray<TExpr1>, mpl::IsArray<TExpr2>>::Value , unsigned int >
1056
1056
GetSize (TExpr1 const & lhs, TExpr2 const & rhs)
1057
1057
{
1058
1058
(void )rhs;
@@ -1071,7 +1071,7 @@ GetSize(TExpr1 const & lhs, TExpr2 const & rhs)
1071
1071
* \sa \c VariableLengthVectorExpression
1072
1072
*/
1073
1073
template <typename TExpr1, typename TExpr2>
1074
- inline typename mpl::EnableIf <mpl::And<mpl::IsArray<TExpr1>, mpl::Not<mpl::IsArray<TExpr2>>>, unsigned int >::Type
1074
+ inline std:: enable_if_t <mpl::And<mpl::IsArray<TExpr1>, mpl::Not<mpl::IsArray<TExpr2>>>::Value , unsigned int >
1075
1075
GetSize (TExpr1 const & lhs, TExpr2 const & itkNotUsed (rhs))
1076
1076
{
1077
1077
return lhs.Size ();
@@ -1087,7 +1087,7 @@ GetSize(TExpr1 const & lhs, TExpr2 const & itkNotUsed(rhs))
1087
1087
* \sa \c VariableLengthVectorExpression
1088
1088
*/
1089
1089
template <typename TExpr1, typename TExpr2>
1090
- inline typename mpl::EnableIf <mpl::And<mpl::IsArray<TExpr2>, mpl::Not<mpl::IsArray<TExpr1>>>, unsigned int >::Type
1090
+ inline std:: enable_if_t <mpl::And<mpl::IsArray<TExpr2>, mpl::Not<mpl::IsArray<TExpr1>>>::Value , unsigned int >
1091
1091
GetSize (TExpr1 const & itkNotUsed (lhs), TExpr2 const & rhs)
1092
1092
{
1093
1093
return rhs.Size ();
@@ -1261,8 +1261,8 @@ struct VariableLengthVectorExpression
1261
1261
* \sa \c mpl::IsArray<> to know the exact array types recognized as \em array by this traits
1262
1262
*/
1263
1263
template <typename TExpr1, typename TExpr2>
1264
- inline typename mpl::EnableIf <Details::op::CanBeAddedOrSubtracted<TExpr1, TExpr2>,
1265
- VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Plus>>::Type
1264
+ inline std:: enable_if_t <Details::op::CanBeAddedOrSubtracted<TExpr1, TExpr2>::Value ,
1265
+ VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Plus>>
1266
1266
operator +(TExpr1 const & lhs, TExpr2 const & rhs)
1267
1267
{
1268
1268
return VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Plus>(lhs, rhs);
@@ -1278,8 +1278,8 @@ operator+(TExpr1 const & lhs, TExpr2 const & rhs)
1278
1278
* \sa \c mpl::IsArray<> to know the exact array types recognized as \em array by this traits
1279
1279
*/
1280
1280
template <typename TExpr1, typename TExpr2>
1281
- inline typename mpl::EnableIf <Details::op::CanBeAddedOrSubtracted<TExpr1, TExpr2>,
1282
- VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Sub>>::Type
1281
+ inline std:: enable_if_t <Details::op::CanBeAddedOrSubtracted<TExpr1, TExpr2>::Value ,
1282
+ VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Sub>>
1283
1283
operator -(TExpr1 const & lhs, TExpr2 const & rhs)
1284
1284
{
1285
1285
return VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Sub>(lhs, rhs);
@@ -1294,8 +1294,8 @@ operator-(TExpr1 const & lhs, TExpr2 const & rhs)
1294
1294
* \sa \c mpl::IsArray<> to know the exact array types recognized as \em array by this traits
1295
1295
*/
1296
1296
template <typename TExpr1, typename TExpr2>
1297
- inline typename mpl::EnableIf <Details::op::CanBeMultiplied<TExpr1, TExpr2>,
1298
- VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Mult>>::Type
1297
+ inline std:: enable_if_t <Details::op::CanBeMultiplied<TExpr1, TExpr2>::Value ,
1298
+ VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Mult>>
1299
1299
operator *(TExpr1 const & lhs, TExpr2 const & rhs)
1300
1300
{
1301
1301
return VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Mult>(lhs, rhs);
@@ -1309,8 +1309,8 @@ operator*(TExpr1 const & lhs, TExpr2 const & rhs)
1309
1309
* \sa \c mpl::IsArray<> to know the exact array types recognized as \em array by this traits
1310
1310
*/
1311
1311
template <typename TExpr1, typename TExpr2>
1312
- inline typename mpl::EnableIf <Details::op::CanBeDivided<TExpr1, TExpr2>,
1313
- VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Div>>::Type
1312
+ inline std:: enable_if_t <Details::op::CanBeDivided<TExpr1, TExpr2>::Value ,
1313
+ VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Div>>
1314
1314
operator /(TExpr1 const & lhs, TExpr2 const & rhs)
1315
1315
{
1316
1316
return VariableLengthVectorExpression<TExpr1, TExpr2, Details::op::Div>(lhs, rhs);
@@ -1341,7 +1341,7 @@ operator<<(std::ostream & os, VariableLengthVectorExpression<TExpr1, TExpr2, TBi
1341
1341
* \relates itk::VariableLengthVectorExpression
1342
1342
*/
1343
1343
template <typename TExpr>
1344
- inline typename mpl::EnableIf <mpl::IsArray<TExpr>, typename TExpr::RealValueType>::Type
1344
+ inline std:: enable_if_t <mpl::IsArray<TExpr>::Value , typename TExpr::RealValueType>
1345
1345
GetNorm (TExpr const & v)
1346
1346
{
1347
1347
return static_cast <typename TExpr::RealValueType>(std::sqrt (static_cast <double >(GetSquaredNorm (v))));
@@ -1353,7 +1353,7 @@ GetNorm(TExpr const & v)
1353
1353
* \relates itk::VariableLengthVectorExpression
1354
1354
*/
1355
1355
template <typename TExpr>
1356
- inline typename mpl::EnableIf <mpl::IsArray<TExpr>, typename TExpr::RealValueType>::Type
1356
+ inline std:: enable_if_t <mpl::IsArray<TExpr>::Value , typename TExpr::RealValueType>
1357
1357
GetSquaredNorm (TExpr const & v)
1358
1358
{
1359
1359
using RealValueType = typename TExpr::RealValueType;
0 commit comments