Fix compile error when template parameter shadows superclass
I'm too lazy to look up the C++ spec, but it seems like template parameter names would shadow the same names from a superclass. Apparently that is not the case for Visual Studio. The `Storage` for the cast array inherits from the `Storage` of the transform array. The latter declares a private type named `SourceStorage`, and that is being used instead of the former's `SourceStorage` template parameter. You then get an error for accessing a private member that you did not want in the first place. Fix the problem by changing the name of the template parameter.
This commit is contained in:
parent
905b5a02be
commit
78aa463da6
@ -119,12 +119,12 @@ struct ArrayHandleCastTraits<TargetT, SourceT, SourceStorage, true, true>
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename TargetT, typename SourceT, typename SourceStorage>
|
||||
struct Storage<TargetT, vtkm::cont::StorageTagCast<SourceT, SourceStorage>>
|
||||
: detail::ArrayHandleCastTraits<TargetT, SourceT, SourceStorage>::StorageSuperclass
|
||||
template <typename TargetT, typename SourceT, typename SourceStorage_>
|
||||
struct Storage<TargetT, vtkm::cont::StorageTagCast<SourceT, SourceStorage_>>
|
||||
: detail::ArrayHandleCastTraits<TargetT, SourceT, SourceStorage_>::StorageSuperclass
|
||||
{
|
||||
using Superclass =
|
||||
typename detail::ArrayHandleCastTraits<TargetT, SourceT, SourceStorage>::StorageSuperclass;
|
||||
typename detail::ArrayHandleCastTraits<TargetT, SourceT, SourceStorage_>::StorageSuperclass;
|
||||
|
||||
using Superclass::Superclass;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user