Commit 6797c6e3 authored by Kenneth Moreland's avatar Kenneth Moreland

Specify return type for GetTimerImpl

The internal function GetTimerImpl has a rather complex expression for
its return type. Prevously this was derived using declspec, but one of
the versions of Visual Studio barfed on that for some reason. So now
declare the return type explicitly.
parent 25f3432b
......@@ -86,16 +86,17 @@ struct Index<T, Container<U, Types...>>
};
template <typename Device>
VTKM_CONT inline auto GetTimerImpl(Device, vtkm::cont::detail::EnabledDeviceTimerImpls* timerImpls)
-> decltype(std::get<Index<Device, EnabledDeviceList>::value>(timerImpls->timerImplTuple))
VTKM_CONT inline
typename std::tuple_element<Index<Device, EnabledDeviceList>::value, EnabledTimerImplTuple>::type&
GetTimerImpl(Device, vtkm::cont::detail::EnabledDeviceTimerImpls* timerImpls)
{
return std::get<Index<Device, EnabledDeviceList>::value>(timerImpls->timerImplTuple);
}
template <typename Device>
VTKM_CONT inline auto GetTimerImpl(Device,
const vtkm::cont::detail::EnabledDeviceTimerImpls* timerImpls)
-> decltype(std::get<Index<Device, EnabledDeviceList>::value>(timerImpls->timerImplTuple))
VTKM_CONT inline const typename std::tuple_element<Index<Device, EnabledDeviceList>::value,
EnabledTimerImplTuple>::type&
GetTimerImpl(Device, const vtkm::cont::detail::EnabledDeviceTimerImpls* timerImpls)
{
return std::get<Index<Device, EnabledDeviceList>::value>(timerImpls->timerImplTuple);
}
......
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