Deprecate brigand.hpp

Add deprecation warnings to the code whenever someone uses brigand.hpp.
We are no longer supporting this header file, but we'll give code a
chance to transition off of it.

Also added some other deprecation warnings to other header files that
are themselves deprecated but only issued warnings if you used something
in it.
This commit is contained in:
Kenneth Moreland 2022-02-10 13:16:16 -07:00
parent 920392b6d8
commit 8d00bb1644
10 changed files with 83 additions and 10 deletions

@ -0,0 +1,18 @@
# No longer use brigand.hpp
Deprecate the use of brigand.hpp both within VTK-m and for any code that
might use VTK-m's distribution of brigand.hpp.
Brigand is a third-party library to support template meta-programming. Over
the years, we have had to make a few modifications to make sure it compiles
with all compilers supported by VTK-m. Unfortunately, because brigand was
added before our standard third-party library management was set up, these
changes are not managed well. Thus, we cannot easily update with any
changes from the project. Thus, our version is slowly diverging from the
original, and maintaining it is a hassle.
Also, we have been using brigand less and less throughout the years. Now
that we have moved on to C++11 (and now C++14) with variadic templates and
other useful `std` features, the features of brigand have become less
critical. Thus, we have implemented all the features we need from brigand
internally and have moved our code away from using it.

@ -34,7 +34,7 @@ set(headers
Hash.h
ImplicitFunction.h
List.h
ListTag.h
ListTag.h # Deprecated, replaced by List.h
LowerBound.h
Math.h
Matrix.h
@ -51,7 +51,7 @@ set(headers
Transform3D.h
Tuple.h
TypeList.h
TypeListTag.h
TypeListTag.h # Deprecated, replaced by TypeList.h
Types.h
TypeTraits.h
VecAxisAlignedPointCoordinates.h

@ -16,10 +16,21 @@
#include <vtkm/StaticAssert.h>
#include <vtkm/internal/ExportMacros.h>
#include <vtkm/internal/brigand.hpp>
#include <type_traits>
struct VTKM_DEPRECATED(1.6, "ListTag.h is deprecated. Include List.h and use vtkm::List instead.")
VTKmListTagHeaderDeprecationWarning
{
};
inline VTKmListTagHeaderDeprecationWarning IssueVTKmListTagHeaderDeprecationWarning()
{
return {};
}
#include <vtkm/internal/brigand.hpp>
namespace vtkm
{
namespace detail

@ -11,6 +11,17 @@
#define vtk_m_TypeListTag_h
// Everything in this header file is deprecated and movded to TypeList.h.
#include <vtkm/Deprecated.h>
struct VTKM_DEPRECATED(1.6, "TypeListTag.h is deprecated. Include TypeList.h and use vtkm::TypeList* instead.")
VTKmTypeListTagHeaderDeprecationWarning
{
};
inline VTKmTypeListTagHeaderDeprecationWarning IssueVTKmTypeListTagHeaderDeprecationWarning()
{
return {};
}
#ifndef VTKM_DEFAULT_TYPE_LIST_TAG
#define VTKM_DEFAULT_TYPE_LIST_TAG ::vtkm::internal::TypeListTagDefault

@ -10,14 +10,19 @@
#ifndef vtk_m_cont_AtomicArray_h
#define vtk_m_cont_AtomicArray_h
#include <vtkm/Deprecated.h>
#include <vtkm/List.h>
#include <vtkm/ListTag.h>
#include <vtkm/StaticAssert.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/exec/AtomicArrayExecutionObject.h>
// Support deprecated features
VTKM_DEPRECATED_SUPPRESS_BEGIN
#include <vtkm/ListTag.h>
VTKM_DEPRECATED_SUPPRESS_END
namespace vtkm
{
namespace cont

@ -10,13 +10,28 @@
#ifndef vtk_m_cont_StorageListTag_h
#define vtk_m_cont_StorageListTag_h
// Everything in this header file is deprecated and movded to StorageList.h.
// Everything in this header file is deprecated and moved to StorageList.h.
#include <vtkm/Deprecated.h>
struct VTKM_DEPRECATED(
1.6,
"TypeListTag.h is deprecated. Include TypeList.h and use vtkm::TypeList* instead.")
VTKmTypeListTagHeaderDeprecationWarning
{
};
inline VTKmTypeListTagHeaderDeprecationWarning IssueVTKmTypeListTagHeaderDeprecationWarning()
{
return {};
}
#ifndef VTKM_DEFAULT_STORAGE_LIST_TAG
#define VTKM_DEFAULT_STORAGE_LIST_TAG ::vtkm::cont::detail::StorageListTagDefault
#endif
VTKM_DEPRECATED_SUPPRESS_BEGIN
#include <vtkm/ListTag.h>
VTKM_DEPRECATED_SUPPRESS_END
#include <vtkm/cont/StorageList.h>

@ -9,6 +9,8 @@
//============================================================================
// This tests deprecated code until it is deleted.
#include <vtkm/Deprecated.h>
VTKM_DEPRECATED_SUPPRESS_BEGIN
#include <vtkm/cont/StorageListTag.h>
@ -16,8 +18,6 @@
#include <vector>
VTKM_DEPRECATED_SUPPRESS_BEGIN
namespace
{

@ -56,7 +56,7 @@ set(headers
ArrayPortalUniformPointCoordinates.h
ArrayPortalValueReference.h
Assume.h
brigand.hpp
brigand.hpp # Deprecated
ConfigureFor32.h
ConfigureFor64.h
ConnectivityStructuredInternals.h

@ -6,6 +6,18 @@
#ifndef BRIGAND_HPP_INCLUDED
#define BRIGAND_HPP_INCLUDED
#include <vtkm/Deprecated.h>
struct VTKM_DEPRECATED(1.8, "VTK-m is no longer internally using brigand.hpp. This header will be removed in the future.")
VTKmBrigandHeaderDeprecationWarning
{
};
inline VTKmBrigandHeaderDeprecationWarning IssueVTKmBrigandHeaderDeprecationWarning()
{
return {};
}
#ifndef BRIGAND_NO_BOOST_SUPPORT
#define BRIGAND_NO_BOOST_SUPPORT
#endif

@ -9,6 +9,9 @@
//============================================================================
// This tests deprecated code until it is deleted.
#include <vtkm/Deprecated.h>
VTKM_DEPRECATED_SUPPRESS_BEGIN
#include <vtkm/TypeListTag.h>
@ -19,8 +22,6 @@
#include <set>
#include <string>
VTKM_DEPRECATED_SUPPRESS_BEGIN
namespace
{