Skip to content

Commit

Permalink
COMP: No longer test is_trivially_copyable in itkMatrixGTest on GCC 4
Browse files Browse the repository at this point in the history
Worked around:

> ITK/Modules/Core/Common/test/itkMatrixGTest.cxx:44:15: error:
> 'is_trivially_copyable' is not a member of 'std'

From CDash (https://open.cdash.org/viewBuildError.php?buildid=7131131):
> Site: AWS-BATCH-88ede920-9899-42aa-8b05-b6d829ac45d3
> Build Name: CentOS Coverage
> Build Time: 2021-03-30 04:52:57

Reported by Matt McCormick at pull request
"ENH: Make itk::Matrix trivially copyable, following Rule of Zero"
#2449
  • Loading branch information
N-Dekker committed Mar 31, 2021
1 parent 0fb00c7 commit f24496d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Modules/Core/Common/test/itkMatrixGTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ Expect_Matrix_default_constructor_zero_initializes_all_elements()
} // namespace


// GCC version 4 does not yet support C++11 `std::is_trivially_copyable`, as
// GCC 4.8.5 produced an error message on an attempt to build ITK 5 from the
// master branch (CentOS Coverage, 2021-03-30), saying:
// > error: 'is_trivially_copyable' is not a member of 'std'
#if (!defined(__GNUC__)) || (__GNUC__ > 4)
static_assert(std::is_trivially_copyable<itk::Matrix<float>>() && std::is_trivially_copyable<itk::Matrix<double>>() &&
std::is_trivially_copyable<itk::Matrix<double, 2, 2>>(),
"Matrix classes of built-in element types should be trivially copyable!");
#endif


TEST(Matrix, DefaultConstructorZeroInitializesAllElements)
Expand Down

0 comments on commit f24496d

Please sign in to comment.