Commit a4dfe50c authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot

Merge topic 'correct_gcc_4_and_5_failures'

99cbbf2f Correct a regression in ArrayHandleDecorator with VisualStudio 2017
e93ce607 Increase VecTraits GCC workaround to be for all GCC 4 and 5 versions
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland's avatarKenneth Moreland <kmorel@sandia.gov>
Merge-request: !1860
parents 72739144 99cbbf2f
......@@ -183,18 +183,18 @@ struct VTKM_NEVER_EXPORT VecTraits<const T> : VecTraits<T>
{
};
#if defined(VTKM_GCC) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#if defined(VTKM_GCC) && (__GNUC__ <= 5)
namespace detail
{
template <typename NewT, vtkm::IdComponent Size>
struct VecReplaceComponentTypeGCC48
struct VecReplaceComponentTypeGCC4or5
{
using type = vtkm::Vec<NewT, Size>;
};
template <typename T, vtkm::IdComponent Size, typename NewT>
struct VecReplaceBaseComponentTypeGCC48
struct VecReplaceBaseComponentTypeGCC4or5
{
using type =
vtkm::Vec<typename vtkm::VecTraits<T>::template ReplaceBaseComponentType<NewT>, Size>;
......@@ -274,12 +274,12 @@ struct VTKM_NEVER_EXPORT VecTraits<vtkm::Vec<T, Size>>
/// This replacement is not recursive. So VecTraits<Vec<Vec<T, M>, N>::ReplaceComponentType<T2>
/// is vtkm::Vec<T2, N>.
///@{
#if defined(VTKM_GCC) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
// Silly workaround for bug in GCC 4.8
#if defined(VTKM_GCC) && (__GNUC__ <= 5)
// Silly workaround for bug in GCC <= 5
template <typename NewComponentType>
using ReplaceComponentType =
typename detail::VecReplaceComponentTypeGCC48<NewComponentType, Size>::type;
#else // !GCC 4.8
typename detail::VecReplaceComponentTypeGCC4or5<NewComponentType, Size>::type;
#else // !GCC <= 5
template <typename NewComponentType>
using ReplaceComponentType = vtkm::Vec<NewComponentType, Size>;
#endif
......@@ -291,12 +291,12 @@ struct VTKM_NEVER_EXPORT VecTraits<vtkm::Vec<T, Size>>
/// is recursive for nested types. For example,
/// VecTraits<Vec<Vec<T, M>, N>::ReplaceComponentType<T2> is Vec<Vec<T2, M>, N>.
///@{
#if defined(VTKM_GCC) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
// Silly workaround for bug in GCC 4.8
#if defined(VTKM_GCC) && (__GNUC__ <= 5)
// Silly workaround for bug in GCC <= 5
template <typename NewComponentType>
using ReplaceBaseComponentType =
typename detail::VecReplaceBaseComponentTypeGCC48<T, Size, NewComponentType>::type;
#else // !GCC 4.8
typename detail::VecReplaceBaseComponentTypeGCC4or5<T, Size, NewComponentType>::type;
#else // !GCC <= 5
template <typename NewComponentType>
using ReplaceBaseComponentType = vtkm::Vec<
typename vtkm::VecTraits<ComponentType>::template ReplaceBaseComponentType<NewComponentType>,
......
......@@ -352,7 +352,7 @@ struct DecoratorStorageTraits
using ArrayTupleType = vtkmstd::tuple<ArrayTs...>;
// size_t integral constants that index ArrayTs:
#if defined(VTKM_MSVC) && (_MSC_VER == 1900)
#if defined(VTKM_MSVC) && (_MSC_VER < 1920) //Less than MSCV2019
using IndexList = brigand::make_sequence<brigand::size_t<0>, sizeof...(ArrayTs)>;
#else
using IndexList = tao::seq::make_index_sequence<sizeof...(ArrayTs)>;
......@@ -435,7 +435,7 @@ struct DecoratorStorageTraits
return { impl.CreateFunctor(portals...), impl.CreateInverseFunctor(portals...), numVals };
}
#if defined(VTKM_MSVC) && (_MSC_VER == 1900)
#if defined(VTKM_MSVC) && (_MSC_VER < 1920) //Less than MSCV2019
// Portal construction methods. These actually create portals.
template <template <typename...> class List, typename... Indices>
VTKM_CONT static PortalControlType MakePortalControl(const DecoratorImplT& impl,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment