diff --git a/Modules/Core/Common/test/itkMetaProgrammingLibraryTest.cxx b/Modules/Core/Common/test/itkMetaProgrammingLibraryTest.cxx index b287e681bf0..c7aff1f450b 100644 --- a/Modules/Core/Common/test/itkMetaProgrammingLibraryTest.cxx +++ b/Modules/Core/Common/test/itkMetaProgrammingLibraryTest.cxx @@ -19,7 +19,6 @@ #include #include "itkMetaProgrammingLibrary.h" -#include "itkStaticAssert.h" int @@ -27,69 +26,65 @@ itkMetaProgrammingLibraryTest(int, char *[]) { using namespace itk::mpl; -#if !defined(ITK_LEGACY_REMOVE) - // Or between constants - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == false), "Unit test failed"); - - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == true), "Unit test failed"); - itkStaticAssert((OrC::Value == false), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == false), "Unit test failed"); + + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == true), "Unit test failed"); + static_assert((OrC::Value == false), "Unit test failed"); // Or between types - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); - - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); + + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); // And between constants - itkStaticAssert((AndC::Value == true), "Unit test failed"); - itkStaticAssert((AndC::Value == false), "Unit test failed"); - itkStaticAssert((AndC::Value == false), "Unit test failed"); - itkStaticAssert((AndC::Value == false), "Unit test failed"); + static_assert((AndC::Value == true), "Unit test failed"); + static_assert((AndC::Value == false), "Unit test failed"); + static_assert((AndC::Value == false), "Unit test failed"); + static_assert((AndC::Value == false), "Unit test failed"); // And between types - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); // Xor between constants - itkStaticAssert((XorC::Value == false), "Unit test failed"); - itkStaticAssert((XorC::Value == true), "Unit test failed"); - itkStaticAssert((XorC::Value == true), "Unit test failed"); - itkStaticAssert((XorC::Value == false), "Unit test failed"); + static_assert((XorC::Value == false), "Unit test failed"); + static_assert((XorC::Value == true), "Unit test failed"); + static_assert((XorC::Value == true), "Unit test failed"); + static_assert((XorC::Value == false), "Unit test failed"); // Xor between types - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); // Not between constants - itkStaticAssert((NotC::Value == false), "Unit test failed"); - itkStaticAssert((NotC::Value == true), "Unit test failed"); + static_assert((NotC::Value == false), "Unit test failed"); + static_assert((NotC::Value == true), "Unit test failed"); // Not between types - itkStaticAssert((std::is_same::Type, FalseType>::value), "Unit test failed"); - itkStaticAssert((std::is_same::Type, TrueType>::value), "Unit test failed"); - -#endif + static_assert((std::is_same::Type, FalseType>::value), "Unit test failed"); + static_assert((std::is_same::Type, TrueType>::value), "Unit test failed"); return EXIT_SUCCESS; }