From 833e51129f220ad8c5fc8e5849a97110ec41faa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 10 Nov 2021 11:31:42 +0100 Subject: [PATCH] really use the type of the returned expression --- .../include/CGAL/Classification/Point_set_neighborhood.h | 2 +- Property_map/include/CGAL/property_map.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classification/include/CGAL/Classification/Point_set_neighborhood.h b/Classification/include/CGAL/Classification/Point_set_neighborhood.h index fed73d0a340..c204a337454 100644 --- a/Classification/include/CGAL/Classification/Point_set_neighborhood.h +++ b/Classification/include/CGAL/Classification/Point_set_neighborhood.h @@ -75,7 +75,7 @@ class Point_set_neighborhood // we did not put `reference` here on purpose as the recommanded default // is `Identity_property_map` and not `Identity_property_map` - friend auto get (const My_point_property_map& ppmap, key_type i) + friend decltype(auto) get (const My_point_property_map& ppmap, key_type i) { return get(ppmap.point_map, *(ppmap.input->begin()+std::size_t(i))); } }; diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index eeea2b0f25b..0dddeefd626 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -411,7 +411,7 @@ struct Property_map_to_unary_function{ {} template - auto + decltype(auto) operator()(const KeyType& a) const { return get(map,a);