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:
Kenneth Moreland 2024-02-07 14:03:13 -05:00
parent 7eadea766f
commit 9c42db5c71
2 changed files with 8 additions and 6 deletions

@ -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

@ -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<>