mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Work around with Visual Studio 2015 issue
Was getting the following error: vtkm/List.h(284): error C2210: 'T' : pack expansions cannot be used as arguments to non-packed parameters in alias templates This is probably an issue with the compiler not resolving templated aliases correctly.
This commit is contained in:
parent
452a2e1c9c
commit
851864d0b5
22
vtkm/List.h
22
vtkm/List.h
@ -277,12 +277,34 @@ struct ListHasImpl<vtkm::ListUniversal, T>
|
||||
template <typename List, typename T>
|
||||
using ListHas = typename detail::ListHasImpl<internal::AsList<List>, T>::type;
|
||||
|
||||
#if defined(VTKM_MSVC) && (_MSC_VER < 1911)
|
||||
|
||||
// Alternate definition of ListAppend to get around an apparent issue with
|
||||
// Visual Studio 2015.
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename... Lists>
|
||||
struct ListAppendImpl
|
||||
{
|
||||
using type = brigand::append<internal::AsList<Lists>...>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename... Lists>
|
||||
using ListAppend = typename detail::ListAppendImpl<Lists...>::type;
|
||||
|
||||
#else // Normal definition
|
||||
|
||||
/// Concatinates a set of lists into a single list.
|
||||
///
|
||||
/// Note that this does not work correctly with `vtkm::ListUniversal`.
|
||||
template <typename... Lists>
|
||||
using ListAppend = brigand::append<internal::AsList<Lists>...>;
|
||||
|
||||
#endif
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user