diff --git a/src/geometry/algorithms/ArborX_Centroid.hpp b/src/geometry/algorithms/ArborX_Centroid.hpp index 3daa73211..6279c4521 100644 --- a/src/geometry/algorithms/ArborX_Centroid.hpp +++ b/src/geometry/algorithms/ArborX_Centroid.hpp @@ -40,7 +40,7 @@ using namespace GeometryTraits; template struct centroid { - KOKKOS_FUNCTION static constexpr auto apply(Point const &point) + KOKKOS_FUNCTION static constexpr auto &apply(Point const &point) { return point; } @@ -62,7 +62,7 @@ struct centroid template struct centroid { - KOKKOS_FUNCTION static constexpr auto apply(Sphere const &sphere) + KOKKOS_FUNCTION static constexpr decltype(auto) apply(Sphere const &sphere) { return sphere.centroid(); }