Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Modules/Core/Common/include/itkSymmetricSecondRankTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ class ITK_TEMPLATE_EXPORT SymmetricSecondRankTensor : public FixedArray<TCompone

/** Default-constructor.
* \note The other five "special member functions" are defaulted implicitly, following the C++ "Rule of Zero". */
#ifdef ITK_FUTURE_LEGACY_REMOVE
SymmetricSecondRankTensor() = default;
#else
SymmetricSecondRankTensor() { this->Fill(0); }
#endif

SymmetricSecondRankTensor(const ComponentType & r) { this->Fill(r); }

Expand Down
9 changes: 8 additions & 1 deletion Modules/Core/Common/test/itkCommonTypeTraitsGTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ TEST(CommonTypeTraits, RGBPixelIsPOD)
EXPECT_TRUE(std::is_trivial_v<T>);
EXPECT_TRUE(std::is_standard_layout_v<T>);
}

Comment thread
dzenanz marked this conversation as resolved.
TEST(CommonTypeTraits, SymmetricSecondRankTensorIsPOD)
{
using T = itk::SymmetricSecondRankTensor<float, 3>;
EXPECT_TRUE(std::is_trivial_v<T>);
EXPECT_TRUE(std::is_standard_layout_v<T>);
}
#else
TEST(CommonTypeTraits, RGBAPixelIsNotPOD)
{
Expand All @@ -90,7 +97,6 @@ TEST(CommonTypeTraits, RGBPixelIsNotPOD)
EXPECT_FALSE(std::is_trivial_v<T>);
EXPECT_TRUE(std::is_standard_layout_v<T>);
}
#endif

TEST(CommonTypeTraits, SymmetricSecondRankTensorIsNotPOD)
{
Expand All @@ -99,6 +105,7 @@ TEST(CommonTypeTraits, SymmetricSecondRankTensorIsNotPOD)
EXPECT_FALSE(std::is_trivial_v<T>);
EXPECT_TRUE(std::is_standard_layout_v<T>);
}
#endif

/************ Second Generation FixedArray *************/
/* Derived from Point */
Expand Down