[GIT] ppl/ppl(devel): Avoid deprecations.

Module: ppl/ppl Branch: devel Commit: c347aef13f954500d819dffe13793e1bba55d360
Author: Abramo Bagnara abramo.bagnara@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();
participants (1)
-
Abramo Bagnara