PPL-devel
Threads by month
- ----- 2025 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
September 2025
- 2 participants
- 3 discussions
Module: ppl/ppl
Branch: modernize_ppl
Commit: c347aef13f954500d819dffe13793e1bba55d360
Author: Abramo Bagnara <abramo.bagnara(a)bugseng.com>
Date: Fri Sep 12 15:04:49 2025 +0200
Avoid deprecations.
---
src/Congruence_System_defs.hh | 13 +++++++------
src/Constraint_System_defs.hh | 12 ++++++------
src/Determinate_defs.hh | 2 +-
src/Generator_System_defs.hh | 12 ++++++------
src/Grid_Generator_System_defs.hh | 12 ++++++------
src/Pointset_Ask_Tell_inlines.hh | 5 +++--
src/Pointset_Powerset_inlines.hh | 5 +++--
src/Powerset_inlines.hh | 4 ++--
src/Ptr_Iterator_defs.hh | 11 ++++-------
9 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/src/Congruence_System_defs.hh b/src/Congruence_System_defs.hh
index cc7d31db9..86f4622a6 100644
--- a/src/Congruence_System_defs.hh
+++ b/src/Congruence_System_defs.hh
@@ -247,13 +247,14 @@ public:
cout << *i << endl;
\endcode
*/
- class const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Congruence,
- std::ptrdiff_t,
- const Congruence*,
- const Congruence&> {
+ class const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Congruence value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Congruence* pointer;
+ typedef const Congruence& reference;
+
//! Default constructor.
const_iterator();
diff --git a/src/Constraint_System_defs.hh b/src/Constraint_System_defs.hh
index d79047c60..cf8402dd4 100644
--- a/src/Constraint_System_defs.hh
+++ b/src/Constraint_System_defs.hh
@@ -607,13 +607,13 @@ for (Constraint_System::const_iterator i = cs.begin(),
// NOTE: This is not an inner class of Constraint_System, so Constraint can
// declare that this class is his friend without including this file
// (the .types.hh file suffices).
-class Parma_Polyhedra_Library::Constraint_System_const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Constraint,
- std::ptrdiff_t,
- const Constraint*,
- const Constraint&> {
+class Parma_Polyhedra_Library::Constraint_System_const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Constraint value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Constraint* pointer;
+ typedef const Constraint& reference;
//! Default constructor.
Constraint_System_const_iterator();
diff --git a/src/Determinate_defs.hh b/src/Determinate_defs.hh
index 886d6919b..fcdc169a2 100644
--- a/src/Determinate_defs.hh
+++ b/src/Determinate_defs.hh
@@ -211,7 +211,7 @@ public:
having signature <CODE>void foo(PSET& x, const PSET& y)</CODE> that
applies an operator to \c x and \c y and assigns the result to \c x.
For instance, such a function object is obtained by
- <CODE>std::mem_fun_ref(&C_Polyhedron::intersection_assign)</CODE>.
+ <CODE>std::mem_fn(&C_Polyhedron::intersection_assign)</CODE>.
*/
#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
template <typename Binary_Operator_Assign>
diff --git a/src/Generator_System_defs.hh b/src/Generator_System_defs.hh
index 2a3b91b4d..dcb0e5c6e 100644
--- a/src/Generator_System_defs.hh
+++ b/src/Generator_System_defs.hh
@@ -677,13 +677,13 @@ const Generator_System& gs = ph.generators();
copy(gs.begin(), gs.end(), ostream_iterator<Generator>(cout, "\n"));
\endcode
*/
-class Parma_Polyhedra_Library::Generator_System_const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Generator,
- std::ptrdiff_t,
- const Generator*,
- const Generator&> {
+class Parma_Polyhedra_Library::Generator_System_const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Generator value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Generator* pointer;
+ typedef const Generator& reference;
//! Default constructor.
Generator_System_const_iterator();
diff --git a/src/Grid_Generator_System_defs.hh b/src/Grid_Generator_System_defs.hh
index 49b69a4d7..ad59c4014 100644
--- a/src/Grid_Generator_System_defs.hh
+++ b/src/Grid_Generator_System_defs.hh
@@ -275,13 +275,13 @@ public:
copy(ggs.begin(), ggs.end(), ostream_iterator<Grid_Generator>(cout, "\n"));
\endcode
*/
- class const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Grid_Generator,
- std::ptrdiff_t,
- const Grid_Generator*,
- const Grid_Generator&> {
+ class const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Grid_Generator value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Grid_Generator* pointer;
+ typedef const Grid_Generator& reference;
//! Default constructor.
const_iterator();
diff --git a/src/Pointset_Ask_Tell_inlines.hh b/src/Pointset_Ask_Tell_inlines.hh
index 3486c04d6..93e067d96 100644
--- a/src/Pointset_Ask_Tell_inlines.hh
+++ b/src/Pointset_Ask_Tell_inlines.hh
@@ -34,6 +34,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "NNC_Polyhedron_defs.hh"
#include <algorithm>
#include <deque>
+#include <functional>
namespace Parma_Polyhedra_Library {
@@ -121,7 +122,7 @@ Pointset_Ask_Tell<PSET>::intersection_assign(const Pointset_Ask_Tell& y) {
Pointset_Ask_Tell& x = *this;
x.pairwise_apply_assign
(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::intersection_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::intersection_assign)));
}
template <typename PSET>
@@ -130,7 +131,7 @@ Pointset_Ask_Tell<PSET>::time_elapse_assign(const Pointset_Ask_Tell& y) {
Pointset_Ask_Tell& x = *this;
x.pairwise_apply_assign
(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::time_elapse_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::time_elapse_assign)));
}
template <typename PSET>
diff --git a/src/Pointset_Powerset_inlines.hh b/src/Pointset_Powerset_inlines.hh
index 1d59d5372..692992580 100644
--- a/src/Pointset_Powerset_inlines.hh
+++ b/src/Pointset_Powerset_inlines.hh
@@ -34,6 +34,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "NNC_Polyhedron_defs.hh"
#include <algorithm>
#include <deque>
+#include <functional>
namespace Parma_Polyhedra_Library {
@@ -221,7 +222,7 @@ inline void
Pointset_Powerset<PSET>::intersection_assign(const Pointset_Powerset& y) {
Pointset_Powerset& x = *this;
x.pairwise_apply_assign(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::intersection_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::intersection_assign)));
}
template <typename PSET>
@@ -229,7 +230,7 @@ inline void
Pointset_Powerset<PSET>::time_elapse_assign(const Pointset_Powerset& y) {
Pointset_Powerset& x = *this;
x.pairwise_apply_assign(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::time_elapse_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::time_elapse_assign)));
}
template <typename PSET>
diff --git a/src/Powerset_inlines.hh b/src/Powerset_inlines.hh
index d3483053b..86ca5733c 100644
--- a/src/Powerset_inlines.hh
+++ b/src/Powerset_inlines.hh
@@ -26,6 +26,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "assertions.hh"
#include <algorithm>
+#include <functional>
namespace Parma_Polyhedra_Library {
@@ -193,11 +194,10 @@ Powerset<D>::collapse() {
collapse(sequence.begin());
}
}
-
template <typename D>
inline void
Powerset<D>::meet_assign(const Powerset& y) {
- pairwise_apply_assign(y, std::mem_fun_ref(&D::meet_assign));
+ pairwise_apply_assign(y, std::mem_fn(&D::meet_assign));
}
template <typename D>
diff --git a/src/Ptr_Iterator_defs.hh b/src/Ptr_Iterator_defs.hh
index 393a35724..b3510f825 100644
--- a/src/Ptr_Iterator_defs.hh
+++ b/src/Ptr_Iterator_defs.hh
@@ -65,16 +65,13 @@ Ptr_Iterator<P> operator+(typename Ptr_Iterator<P>::difference_type m,
//! A class to define STL const and non-const iterators from pointer types.
#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
template <typename P>
-class Parma_Polyhedra_Library::Implementation::Ptr_Iterator
- : public std::iterator<typename std::iterator_traits<P>::iterator_category,
- typename std::iterator_traits<P>::value_type,
- typename std::iterator_traits<P>::difference_type,
- typename std::iterator_traits<P>::pointer,
- typename std::iterator_traits<P>::reference> {
+class Parma_Polyhedra_Library::Implementation::Ptr_Iterator {
public:
+ typedef typename std::iterator_traits<P>::iterator_category iterator_category;
+ typedef typename std::iterator_traits<P>::value_type value_type;
typedef typename std::iterator_traits<P>::difference_type difference_type;
- typedef typename std::iterator_traits<P>::reference reference;
typedef typename std::iterator_traits<P>::pointer pointer;
+ typedef typename std::iterator_traits<P>::reference reference;
//! Default constructor: no guarantees.
Ptr_Iterator();
1
0

Re: Disjunction of two Pointset_Powerset? (likely bug in the OCaml binding)
by BUGSENG Support 22 Sep '25
by BUGSENG Support 22 Sep '25
22 Sep '25
Dear Étienne,
thank you for contacting us directly.
The ppl-devel mailing list has been relocated under a different domain
(bugseng.com), we did not receive you emails.
A notice informing of the relocation has been sent to all mailing list
subscribers on Jan 22. Subject was: "PPL-devel mailing list relocation".
Please, see the new PPL-devel home at:
https://support.bugseng.com/cgi-bin/mailman/listinfo/ppl-devel
Thank you for the bug report, we will look at it as soon as possible.
Can you please share with us a testcase to reproduce the error?
Do you have any additional information that might be helpful?
Thank you, regards
Federico
On 08/11/24 14:00, Étienne André wrote:
> Dear PPL developers,
>
> I received a "mailer daemon" in reply to my former email related to a
> likely bug in the OCaml interface, so I take the liberty to write
> another email (see below).
>
> Many thanks for your answer.
>
> Best,
>
> Étienne André
> Université Sorbonne Paris Nord
> https://lipn.univ-paris13.fr/~andre/
>
> Le 22/10/2024 à 15:09, Étienne André a écrit :
>>
>> Dear PPL developers,
>>
>> We didn't have news since March, but we tried to investigate the
>> problem, and it looks now rather likely to us that the bug mentioned
>> in my first email /does/ come from a bug in PPL, more precisely from
>> the OCaml binding. It is likely that some "free" operations on
>> pointers in the binding are unnecessary, and cause the garbage
>> collector to access some already destroyed objects, leading to
>> segmentation faults.
>>
>> My colleagues are trying to fix the binding so as to remove the "free"
>> operations, and let the OCaml garbage collector do its job naturally.
>>
>> We still want to point out this issue, and we do encourage you in
>> investigating this matter.
>>
>> Best,
>>
>> Étienne André
>> Université Sorbonne Paris Nord
>> https://lipn.univ-paris13.fr/~andre/
>>
>>> Em sex., 31 de mai. de 2024 às 13:34, Étienne André
>>> <Andre.Etienne(a)lipn13.fr> escreveu:
>>>
>>> Dear PPL developers,
>>>
>>> I wonder whether you had received our email, and might have an
>>> idea of why we encounter an issue of corrupted memory with
>>> Pointset_Powerset.
>>>
>>> Thank you!
>>>
>>> Best,
>>>
>>> Étienne André
>>> Université Sorbonne Paris Nord
>>> https://lipn.univ-paris13.fr/~andre/
>>>
>>> Le 18/03/2024 à 11:09, Étienne André a écrit :
>>>>
>>>> Dear PPL developers,
>>>>
>>>> We got an issue in developing IMITATOR with the PPL OCaml
>>>> binding, most probably not related to a PPL bug (even if we
>>>> don't fully exclude it either).
>>>>
>>>> Our goal is to perform the disjunction of two Pointset_Powerset,
>>>> i.e., union_assign p1 p2, where p1 gets as the result the union
>>>> of p1 and p2.
>>>>
>>>> I don't think there is a function to directly do this in PPL? If
>>>> there is, which one should we use?
>>>>
>>>> Our algorithm is as follows:
>>>>
>>>> 1. get all disjuncts of p2 (using an iterator)
>>>> 2. for each disjunct, add it to p1 using the PPL OCaml binding
>>>> function ppl_Pointset_Powerset_NNC_Polyhedron_add_disjunct
>>>>
>>>> Is that the right way to do?
>>>>
>>>>
>>>> We got dimensions exceptions, both very random (changing the
>>>> input file name yields a different exception!) and with
>>>> completely funny dimensions (such as 208 or 416) for a system
>>>> that has only 2 dimensions, and/or segmentation faults/core dump
>>>> which might come from a corrupted memory somewhere.
>>>>
>>>> We use OCaml 4.14.1 with (presumably) PPL 1:1.2-8.1build1.
>>>>
>>>> Thanks!
>>>>
>>>> Best,
>>>>
>>>> --
>>>> Étienne André
>>>> Université Sorbonne Paris Nord
>>>> https://lipn.univ-paris13.fr/~andre/
>>>
>>>
>>>
>>> --
>>> att. Tomaz Gomes
2
1
Module: ppl/ppl
Branch: devel
Commit: c347aef13f954500d819dffe13793e1bba55d360
Author: Abramo Bagnara <abramo.bagnara(a)bugseng.com>
Date: Fri Sep 12 15:04:49 2025 +0200
Avoid deprecations.
---
src/Congruence_System_defs.hh | 13 +++++++------
src/Constraint_System_defs.hh | 12 ++++++------
src/Determinate_defs.hh | 2 +-
src/Generator_System_defs.hh | 12 ++++++------
src/Grid_Generator_System_defs.hh | 12 ++++++------
src/Pointset_Ask_Tell_inlines.hh | 5 +++--
src/Pointset_Powerset_inlines.hh | 5 +++--
src/Powerset_inlines.hh | 4 ++--
src/Ptr_Iterator_defs.hh | 11 ++++-------
9 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/src/Congruence_System_defs.hh b/src/Congruence_System_defs.hh
index cc7d31db9..86f4622a6 100644
--- a/src/Congruence_System_defs.hh
+++ b/src/Congruence_System_defs.hh
@@ -247,13 +247,14 @@ public:
cout << *i << endl;
\endcode
*/
- class const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Congruence,
- std::ptrdiff_t,
- const Congruence*,
- const Congruence&> {
+ class const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Congruence value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Congruence* pointer;
+ typedef const Congruence& reference;
+
//! Default constructor.
const_iterator();
diff --git a/src/Constraint_System_defs.hh b/src/Constraint_System_defs.hh
index d79047c60..cf8402dd4 100644
--- a/src/Constraint_System_defs.hh
+++ b/src/Constraint_System_defs.hh
@@ -607,13 +607,13 @@ for (Constraint_System::const_iterator i = cs.begin(),
// NOTE: This is not an inner class of Constraint_System, so Constraint can
// declare that this class is his friend without including this file
// (the .types.hh file suffices).
-class Parma_Polyhedra_Library::Constraint_System_const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Constraint,
- std::ptrdiff_t,
- const Constraint*,
- const Constraint&> {
+class Parma_Polyhedra_Library::Constraint_System_const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Constraint value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Constraint* pointer;
+ typedef const Constraint& reference;
//! Default constructor.
Constraint_System_const_iterator();
diff --git a/src/Determinate_defs.hh b/src/Determinate_defs.hh
index 886d6919b..fcdc169a2 100644
--- a/src/Determinate_defs.hh
+++ b/src/Determinate_defs.hh
@@ -211,7 +211,7 @@ public:
having signature <CODE>void foo(PSET& x, const PSET& y)</CODE> that
applies an operator to \c x and \c y and assigns the result to \c x.
For instance, such a function object is obtained by
- <CODE>std::mem_fun_ref(&C_Polyhedron::intersection_assign)</CODE>.
+ <CODE>std::mem_fn(&C_Polyhedron::intersection_assign)</CODE>.
*/
#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
template <typename Binary_Operator_Assign>
diff --git a/src/Generator_System_defs.hh b/src/Generator_System_defs.hh
index 2a3b91b4d..dcb0e5c6e 100644
--- a/src/Generator_System_defs.hh
+++ b/src/Generator_System_defs.hh
@@ -677,13 +677,13 @@ const Generator_System& gs = ph.generators();
copy(gs.begin(), gs.end(), ostream_iterator<Generator>(cout, "\n"));
\endcode
*/
-class Parma_Polyhedra_Library::Generator_System_const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Generator,
- std::ptrdiff_t,
- const Generator*,
- const Generator&> {
+class Parma_Polyhedra_Library::Generator_System_const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Generator value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Generator* pointer;
+ typedef const Generator& reference;
//! Default constructor.
Generator_System_const_iterator();
diff --git a/src/Grid_Generator_System_defs.hh b/src/Grid_Generator_System_defs.hh
index 49b69a4d7..ad59c4014 100644
--- a/src/Grid_Generator_System_defs.hh
+++ b/src/Grid_Generator_System_defs.hh
@@ -275,13 +275,13 @@ public:
copy(ggs.begin(), ggs.end(), ostream_iterator<Grid_Generator>(cout, "\n"));
\endcode
*/
- class const_iterator
- : public std::iterator<std::forward_iterator_tag,
- Grid_Generator,
- std::ptrdiff_t,
- const Grid_Generator*,
- const Grid_Generator&> {
+ class const_iterator {
public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Grid_Generator value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const Grid_Generator* pointer;
+ typedef const Grid_Generator& reference;
//! Default constructor.
const_iterator();
diff --git a/src/Pointset_Ask_Tell_inlines.hh b/src/Pointset_Ask_Tell_inlines.hh
index 3486c04d6..93e067d96 100644
--- a/src/Pointset_Ask_Tell_inlines.hh
+++ b/src/Pointset_Ask_Tell_inlines.hh
@@ -34,6 +34,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "NNC_Polyhedron_defs.hh"
#include <algorithm>
#include <deque>
+#include <functional>
namespace Parma_Polyhedra_Library {
@@ -121,7 +122,7 @@ Pointset_Ask_Tell<PSET>::intersection_assign(const Pointset_Ask_Tell& y) {
Pointset_Ask_Tell& x = *this;
x.pairwise_apply_assign
(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::intersection_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::intersection_assign)));
}
template <typename PSET>
@@ -130,7 +131,7 @@ Pointset_Ask_Tell<PSET>::time_elapse_assign(const Pointset_Ask_Tell& y) {
Pointset_Ask_Tell& x = *this;
x.pairwise_apply_assign
(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::time_elapse_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::time_elapse_assign)));
}
template <typename PSET>
diff --git a/src/Pointset_Powerset_inlines.hh b/src/Pointset_Powerset_inlines.hh
index 1d59d5372..692992580 100644
--- a/src/Pointset_Powerset_inlines.hh
+++ b/src/Pointset_Powerset_inlines.hh
@@ -34,6 +34,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "NNC_Polyhedron_defs.hh"
#include <algorithm>
#include <deque>
+#include <functional>
namespace Parma_Polyhedra_Library {
@@ -221,7 +222,7 @@ inline void
Pointset_Powerset<PSET>::intersection_assign(const Pointset_Powerset& y) {
Pointset_Powerset& x = *this;
x.pairwise_apply_assign(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::intersection_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::intersection_assign)));
}
template <typename PSET>
@@ -229,7 +230,7 @@ inline void
Pointset_Powerset<PSET>::time_elapse_assign(const Pointset_Powerset& y) {
Pointset_Powerset& x = *this;
x.pairwise_apply_assign(y,
- Det_PSET::lift_op_assign(std::mem_fun_ref(&PSET::time_elapse_assign)));
+ Det_PSET::lift_op_assign(std::mem_fn(&PSET::time_elapse_assign)));
}
template <typename PSET>
diff --git a/src/Powerset_inlines.hh b/src/Powerset_inlines.hh
index d3483053b..86ca5733c 100644
--- a/src/Powerset_inlines.hh
+++ b/src/Powerset_inlines.hh
@@ -26,6 +26,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "assertions.hh"
#include <algorithm>
+#include <functional>
namespace Parma_Polyhedra_Library {
@@ -193,11 +194,10 @@ Powerset<D>::collapse() {
collapse(sequence.begin());
}
}
-
template <typename D>
inline void
Powerset<D>::meet_assign(const Powerset& y) {
- pairwise_apply_assign(y, std::mem_fun_ref(&D::meet_assign));
+ pairwise_apply_assign(y, std::mem_fn(&D::meet_assign));
}
template <typename D>
diff --git a/src/Ptr_Iterator_defs.hh b/src/Ptr_Iterator_defs.hh
index 393a35724..b3510f825 100644
--- a/src/Ptr_Iterator_defs.hh
+++ b/src/Ptr_Iterator_defs.hh
@@ -65,16 +65,13 @@ Ptr_Iterator<P> operator+(typename Ptr_Iterator<P>::difference_type m,
//! A class to define STL const and non-const iterators from pointer types.
#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
template <typename P>
-class Parma_Polyhedra_Library::Implementation::Ptr_Iterator
- : public std::iterator<typename std::iterator_traits<P>::iterator_category,
- typename std::iterator_traits<P>::value_type,
- typename std::iterator_traits<P>::difference_type,
- typename std::iterator_traits<P>::pointer,
- typename std::iterator_traits<P>::reference> {
+class Parma_Polyhedra_Library::Implementation::Ptr_Iterator {
public:
+ typedef typename std::iterator_traits<P>::iterator_category iterator_category;
+ typedef typename std::iterator_traits<P>::value_type value_type;
typedef typename std::iterator_traits<P>::difference_type difference_type;
- typedef typename std::iterator_traits<P>::reference reference;
typedef typename std::iterator_traits<P>::pointer pointer;
+ typedef typename std::iterator_traits<P>::reference reference;
//! Default constructor: no guarantees.
Ptr_Iterator();
1
0