File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,6 @@ class ITKCommon_EXPORT TimeStamp
7070 static Self *
7171 New ();
7272
73- /* * Constructor must remain public because classes instantiate
74- * TimeStamps implicitly in their construction. */
75- TimeStamp () { m_ModifiedTime = 0 ; }
76-
7773 /* * Destoy this instance. */
7874 void
7975 Delete ()
@@ -120,17 +116,12 @@ class ITKCommon_EXPORT TimeStamp
120116 /* * Allow for typecasting to unsigned long. */
121117 operator ModifiedTimeType () const { return m_ModifiedTime; }
122118
123- /* * Assignment operator, allows to initialize one time stamp by copying from
124- * another. */
125- Self &
126- operator =(const Self & other) = default ;
127-
128119private:
129120 /* * Set/Get the pointer to GlobalTimeStamp.
130121 * Note that SetGlobalTimeStamp is not concurrent thread safe. */
131122 itkGetGlobalDeclarationMacro (GlobalTimeStampType, GlobalTimeStamp);
132123
133- ModifiedTimeType m_ModifiedTime;
124+ ModifiedTimeType m_ModifiedTime{ 0 } ;
134125
135126 /* * The static GlobalTimeStamp. This is initialized to NULL as the first
136127 * stage of static initialization. It is then populated on the first call to
Original file line number Diff line number Diff line change 1616 *
1717 *=========================================================================*/
1818
19- #include < iostream>
2019#include " itkTimeStamp.h"
2120#include " itkMultiThreaderBase.h"
2221
22+ #include < iostream>
23+ #include < type_traits>
24+
25+ static_assert (std::is_nothrow_default_constructible<itk::TimeStamp>::value, " Check TimeStamp default-constructibility" );
26+ static_assert (std::is_trivially_copy_constructible<itk::TimeStamp>::value, " Check TimeStamp copy-constructibility" );
27+ static_assert (std::is_trivially_copy_assignable<itk::TimeStamp>::value, " Check TimeStamp copy-assignability" );
28+ static_assert (std::is_trivially_destructible<itk::TimeStamp>::value, " Check TimeStamp destructibility" );
2329
2430// A helper struct for the test, the idea is to have one timestamp per thread.
2531// To ease the writing of the test, we use MultiThreaderBase::SingleMethodExecute
You can’t perform that action at this time.
0 commit comments