Skip to content

Commit

Permalink
ENH: Deprecated mpl::IsConvertible and the header which implements it
Browse files Browse the repository at this point in the history
I did not find instances of it being used.
  • Loading branch information
dzenanz committed Sep 13, 2021
1 parent d458298 commit 2f29c8d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 38 deletions.
1 change: 1 addition & 0 deletions Documentation/ITK5MigrationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ To modernize your code base, replace:
* `mpl::EnableIf<X>::Type` with `std::enable_if_t<X>`, and `#include "itkEnableIf.h"` with `#include <type_traits>`.
* `mpl::IsSame<X, Y>::Value` with `std::is_same<X, Y>::value`, and `#include "itkIsSame.h"` with `#include <type_traits>`.
* `mpl::IsBaseOf<X, Y>::Value` with `std::is_base_of<X, Y>::value`, and `#include "itkIsBaseOf.h"` with `#include <type_traits>`.
* `mpl::IsConvertible<X, Y>::Value` with `std::is_convertible<X, Y>::value`, and `#include "itkIsBaseOf.h"` with `#include <type_traits>`.


Modern CMake requirement
Expand Down
11 changes: 10 additions & 1 deletion Modules/Core/Common/include/itkIsConvertible.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
#ifndef itkIsConvertible_h
#define itkIsConvertible_h

#include "itkMetaProgrammingLibrary.h"
#include "itkMacro.h"

#if !defined(ITK_LEGACY_REMOVE)

# include "itkMetaProgrammingLibrary.h"

namespace itk
{
Expand Down Expand Up @@ -79,4 +83,9 @@ using mpl::IsConvertible;
/** \endcond */

} // end namespace itk

#else // ITK_LEGACY_REMOVE
# error Use C++ 11 std::is_convertible directly
#endif

#endif // itkIsConvertible_h
1 change: 0 additions & 1 deletion Modules/Core/Common/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ itkMultiThreaderParallelizeArrayTest.cxx
itkMultithreadingTest.cxx

itkMetaProgrammingLibraryTest.cxx
itkIsConvertible.cxx
itkPromoteType.cxx
itkMetaDataDictionaryTest.cxx
itkStdStreamLogOutputTest.cxx
Expand Down
36 changes: 0 additions & 36 deletions Modules/Core/Common/test/itkIsConvertible.cxx

This file was deleted.

1 change: 1 addition & 0 deletions Utilities/Maintenance/BuildHeaderTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"itkEnableIf.h", # Compatibility file, it should not be used
"itkIsSame.h", # Compatibility file, it should not be used
"itkIsBaseOf.h", # Compatibility file, it should not be used
"itkIsConvertible.h", # Compatibility file, it should not be used
"itkViewImage.h", # Depends on VTK_RENDERING_BACKEND
"QuickView.h", # Depends on VTK_RENDERING_BACKEND
"itkBSplineDeformableTransformInitializer.h",
Expand Down

0 comments on commit 2f29c8d

Please sign in to comment.