Commit e93ce607 authored by Robert Maynard's avatar Robert Maynard

Increase VecTraits GCC workaround to be for all GCC 4 and 5 versions

parent 72739144
......@@ -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 <= 6
template <typename NewComponentType>
using ReplaceComponentType =
typename detail::VecReplaceComponentTypeGCC48<NewComponentType, Size>::type;
#else // !GCC 4.8
typename detail::VecReplaceComponentTypeGCC4or5<NewComponentType, Size>::type;
#else // !GCC <= 6
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 <= 6
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 <= 6
template <typename NewComponentType>
using ReplaceBaseComponentType = vtkm::Vec<
typename vtkm::VecTraits<ComponentType>::template ReplaceBaseComponentType<NewComponentType>,
......
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