mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Fix sphinx/breathe warning about function reference
The breathe parser was having trouble with using `{}` inside of a declspec for the return value. Replace this with parenthesis, which cannot be confused with the openning of the function.
This commit is contained in:
parent
7eadea766f
commit
9c42db5c71
@ -749,8 +749,8 @@ Transform Each Tuple Value
|
||||
The :func:`vtkm::Transform` function builds a new :class:`vtkm::Tuple` by calling a function or functor on each of the items in an existing :class:`vtkm::Tuple`.
|
||||
The return value is placed in the corresponding part of the resulting :class:`vtkm::Tuple`, and the type is automatically created from the return type of the function.
|
||||
|
||||
.. doxygenfunction:: vtkm::Transform(const TupleType &&tuple, Function &&f) -> decltype(Apply(tuple, detail::TupleTransformFunctor{}, std::forward<Function>(f)))
|
||||
.. doxygenfunction:: vtkm::Transform(TupleType &&tuple, Function &&f) -> decltype(Apply(tuple, detail::TupleTransformFunctor{}, std::forward<Function>(f)))
|
||||
.. doxygenfunction:: vtkm::Transform(const TupleType &&tuple, Function &&f) -> decltype(Apply(tuple, detail::TupleTransformFunctor(), std::forward<Function>(f)))
|
||||
.. doxygenfunction:: vtkm::Transform(TupleType &&tuple, Function &&f) -> decltype(Apply(tuple, detail::TupleTransformFunctor(), std::forward<Function>(f)))
|
||||
|
||||
.. load-example:: TupleTransform
|
||||
:file: GuideExampleTuple.cxx
|
||||
|
10
vtkm/Tuple.h
10
vtkm/Tuple.h
@ -202,6 +202,7 @@ VTKM_EXEC_CONT void ForEach(vtkm::Tuple<Ts...>& tuple, Function&& f)
|
||||
return vtkm::Apply(tuple, detail::TupleForEachFunctor{}, std::forward<Function>(f));
|
||||
}
|
||||
|
||||
///@{
|
||||
/// @brief Construct a new `vtkm::Tuple` by applying a function to each value.
|
||||
///
|
||||
/// The `vtkm::Transform` function builds a new `vtkm::Tuple` by calling a function
|
||||
@ -210,17 +211,18 @@ VTKM_EXEC_CONT void ForEach(vtkm::Tuple<Ts...>& tuple, Function&& f)
|
||||
/// created from the return type of the function.
|
||||
template <typename TupleType, typename Function>
|
||||
VTKM_EXEC_CONT auto Transform(const TupleType&& tuple, Function&& f)
|
||||
-> decltype(Apply(tuple, detail::TupleTransformFunctor{}, std::forward<Function>(f)))
|
||||
-> decltype(Apply(tuple, detail::TupleTransformFunctor(), std::forward<Function>(f)))
|
||||
{
|
||||
return Apply(tuple, detail::TupleTransformFunctor{}, std::forward<Function>(f));
|
||||
return Apply(tuple, detail::TupleTransformFunctor(), std::forward<Function>(f));
|
||||
}
|
||||
|
||||
template <typename TupleType, typename Function>
|
||||
VTKM_EXEC_CONT auto Transform(TupleType&& tuple, Function&& f)
|
||||
-> decltype(Apply(tuple, detail::TupleTransformFunctor{}, std::forward<Function>(f)))
|
||||
-> decltype(Apply(tuple, detail::TupleTransformFunctor(), std::forward<Function>(f)))
|
||||
{
|
||||
return Apply(tuple, detail::TupleTransformFunctor{}, std::forward<Function>(f));
|
||||
return Apply(tuple, detail::TupleTransformFunctor(), std::forward<Function>(f));
|
||||
}
|
||||
///@}
|
||||
|
||||
template <>
|
||||
class Tuple<>
|
||||
|
Loading…
Reference in New Issue
Block a user