mirror of https://github.com/CGAL/cgal
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.
This commit is contained in:
parent
2321427500
commit
7c4123152b
|
|
@ -43,6 +43,8 @@ class Prevent_deref
|
|||
Prevent_deref<I>
|
||||
, I // base
|
||||
, I // value
|
||||
, boost::use_default
|
||||
, I
|
||||
>
|
||||
{
|
||||
public:
|
||||
|
|
@ -50,6 +52,8 @@ public:
|
|||
Prevent_deref<I>
|
||||
, I // base
|
||||
, I // value
|
||||
, boost::use_default
|
||||
, I
|
||||
> Base;
|
||||
typedef typename Base::reference reference;
|
||||
typedef typename std::pair<I, I> range;
|
||||
|
|
|
|||
Loading…
Reference in New Issue