From 7c4123152b61c97613332973dc199644a4e625ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 24 Oct 2022 17:58:52 +0200 Subject: [PATCH] Prevent_deref shall not return a reference to the iterator as it can be copied iterator being taken by copy usually, if a function takes a an iterator by copy and that function returns the reference type of the deref operator then a reference to a temporary will be returned. --- STL_Extension/include/CGAL/iterator.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index e395ab3c76f..acc6b5101a6 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -43,6 +43,8 @@ class Prevent_deref Prevent_deref , I // base , I // value + , boost::use_default + , I > { public: @@ -50,6 +52,8 @@ public: Prevent_deref , I // base , I // value + , boost::use_default + , I > Base; typedef typename Base::reference reference; typedef typename std::pair range;