mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Remove brigand.hpp
GCC 11 is having trouble compiling brigand.hpp at all, even before we instantiate any templates. Since we no longer need it, let's get rid of it. It was always placed in an internal namespace.
This commit is contained in:
parent
8d00bb1644
commit
0f96a6b0be
@ -54,6 +54,5 @@ vtkm/cont/tbb/internal/parallel_sort.h
|
||||
vtkm/cont/tbb/internal/parallel_radix_sort_tbb.h
|
||||
vtkm/cont/tbb/internal/kxsort.h
|
||||
vtkm/thirdparty
|
||||
vtkm/internal/brigand.hpp
|
||||
version.txt
|
||||
.gitlab/cmake
|
||||
|
@ -1,7 +1,8 @@
|
||||
# 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.
|
||||
Remove brigand.hpp from VTK-m's source and all references to it. This was
|
||||
declared in an internal directory, so making this backward-incompatible
|
||||
changes should be OK.
|
||||
|
||||
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
|
||||
|
@ -29,8 +29,6 @@ inline VTKmListTagHeaderDeprecationWarning IssueVTKmListTagHeaderDeprecationWarn
|
||||
return {};
|
||||
}
|
||||
|
||||
#include <vtkm/internal/brigand.hpp>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace detail
|
||||
@ -46,7 +44,7 @@ struct ListRoot
|
||||
};
|
||||
|
||||
template <class... T>
|
||||
using ListBase = brigand::list<T...>;
|
||||
using ListBase = vtkm::List<T...>;
|
||||
|
||||
/// list value that is used to represent a list actually matches all values
|
||||
struct UniversalTag
|
||||
@ -126,7 +124,7 @@ namespace detail
|
||||
|
||||
/// @cond NONE
|
||||
template <typename ListTag>
|
||||
struct ListTagAsBrigandListImpl
|
||||
struct ListTagAsListImpl
|
||||
{
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
VTKM_IS_LIST_TAG(ListTag);
|
||||
@ -137,10 +135,10 @@ struct ListTagAsBrigandListImpl
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/// Converts a ListTag to a brigand::list.
|
||||
/// Converts a ListTag to a vtkm::List.
|
||||
///
|
||||
template <typename ListTag>
|
||||
using ListTagAsBrigandList = typename detail::ListTagAsBrigandListImpl<ListTag>::type;
|
||||
using ListTagAsList = typename detail::ListTagAsListImpl<ListTag>::type;
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
namespace detail
|
||||
@ -170,27 +168,13 @@ struct AsListImpl
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
using type = typename std::conditional<std::is_base_of<vtkm::ListTagUniversal, T>::value,
|
||||
vtkm::ListUniversal,
|
||||
brigand::wrap<ListTagAsBrigandList<T>, vtkm::List>>::type;
|
||||
ListTagAsList<T>>::type;
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename BrigandList, template <typename...> class Target>
|
||||
struct ListTagApplyImpl;
|
||||
|
||||
template <typename... Ts, template <typename...> class Target>
|
||||
struct ListTagApplyImpl<brigand::list<Ts...>, Target>
|
||||
{
|
||||
using type = Target<Ts...>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/// \brief Applies the list of types to a template.
|
||||
///
|
||||
/// Given a ListTag and a templated class, returns the class instantiated with the types
|
||||
@ -198,7 +182,7 @@ struct ListTagApplyImpl<brigand::list<Ts...>, Target>
|
||||
///
|
||||
template <typename ListTag, template <typename...> class Target>
|
||||
using ListTagApply VTKM_DEPRECATED(1.6, "ListTagApply replaced by ListApply.") =
|
||||
typename detail::ListTagApplyImpl<internal::ListTagAsBrigandList<ListTag>, Target>::type;
|
||||
vtkm::ListApply<ListTag, Target>;
|
||||
|
||||
/// A special tag for an empty list.
|
||||
///
|
||||
@ -296,26 +280,18 @@ struct VTKM_DEPRECATED(
|
||||
};
|
||||
/// @endcond
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Old stlye ListCrossProduct expects brigand::list instead of vtkm::List. Transform back
|
||||
template <typename List>
|
||||
using ListToBrigand = vtkm::ListApply<List, brigand::list>;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/// Generate a tag that is the cross product of two other tags. The resulting
|
||||
/// tag has the form of Tag< brigand::list<A1,B1>, brigand::list<A1,B2> .... >
|
||||
/// tag has the form of Tag< vtkm::List<A1,B1>, vtkm::List<A1,B2> .... >
|
||||
///
|
||||
/// Note that as of VTK-m 1.8, the behavior of this (already depreciated) operation
|
||||
/// was changed to return pairs in vtkm::List instead of brigand::list.
|
||||
///
|
||||
/// @cond NONE
|
||||
template <typename ListTag1, typename ListTag2>
|
||||
struct VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"ListCrossProduct replaced by ListCross. Note that LIstCross cannot be subclassed.")
|
||||
ListCrossProduct
|
||||
: vtkm::internal::ListAsListTag<
|
||||
vtkm::ListTransform<vtkm::ListCross<ListTag1, ListTag2>, detail::ListToBrigand>>
|
||||
"ListCrossProduct replaced by ListCross. Note that ListCross cannot be subclassed.")
|
||||
ListCrossProduct : vtkm::internal::ListAsListTag<vtkm::ListCross<ListTag1, ListTag2>>
|
||||
{
|
||||
};
|
||||
/// @endcond
|
||||
@ -343,8 +319,7 @@ struct VTKM_DEPRECATED(1.6, "ListTypeAt::type replaced by ListAt.") ListTypeAt
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
VTKM_IS_LIST_TAG(ListTag);
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
using type = brigand::at<internal::ListTagAsBrigandList<ListTag>,
|
||||
std::integral_constant<vtkm::IdComponent, Index>>;
|
||||
using type = vtkm::ListAt<ListTag, Index>;
|
||||
};
|
||||
|
||||
} // namespace vtkm
|
||||
|
@ -56,7 +56,6 @@ set(headers
|
||||
ArrayPortalUniformPointCoordinates.h
|
||||
ArrayPortalValueReference.h
|
||||
Assume.h
|
||||
brigand.hpp # Deprecated
|
||||
ConfigureFor32.h
|
||||
ConfigureFor64.h
|
||||
ConnectivityStructuredInternals.h
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@
|
||||
#include <vtkm/rendering/Scene.h>
|
||||
#include <vtkm/rendering/TextAnnotation.h>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace vtkm
|
||||
|
@ -134,7 +134,7 @@ struct TestListTagRemoveIfBackward : vtkm::ListTagRemoveIf<TestListTagBackward4,
|
||||
};
|
||||
|
||||
template <int N, int M>
|
||||
std::pair<int, int> test_number(brigand::list<TestClass<N>, TestClass<M>>)
|
||||
std::pair<int, int> test_number(vtkm::List<TestClass<N>, TestClass<M>>)
|
||||
{
|
||||
return std::make_pair(N, M);
|
||||
}
|
||||
@ -193,9 +193,8 @@ void CheckContains(TestClass<N>, TestListTagUniversal, const std::vector<int>&)
|
||||
{
|
||||
//Use intersect to verify at compile time that ListTag contains TestClass<N>
|
||||
using intersectWith = vtkm::ListTagBase<TestClass<N>>;
|
||||
using intersectResult = vtkm::internal::ListTagAsBrigandList<
|
||||
vtkm::ListTagIntersect<intersectWith, TestListTagUniversal>>;
|
||||
constexpr bool intersectContains = (brigand::size<intersectResult>::value != 0);
|
||||
using intersectResult = vtkm::ListTagIntersect<intersectWith, TestListTagUniversal>;
|
||||
constexpr bool intersectContains = (vtkm::ListSize<intersectResult>::value != 0);
|
||||
constexpr bool listContains = vtkm::ListContains<TestListTagUniversal, TestClass<N>>::value;
|
||||
|
||||
VTKM_TEST_ASSERT(intersectContains == listContains, "ListTagIntersect check failed.");
|
||||
|
Loading…
Reference in New Issue
Block a user