[GIT] ppl/ppl(master): Added missing inclusions. Use std::ptrdiff_t.

Module: ppl/ppl Branch: master Commit: 61d4e14dfd9f1121e9b4521dead5728b2424dd7c URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=61d4e14dfd9f1...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Tue Apr 29 21:51:43 2014 +0200
Added missing inclusions. Use std::ptrdiff_t. (Thanks to Paulo Cesar Pereira de Andrade.)
---
src/CO_Tree.cc | 2 +- src/CO_Tree_defs.hh | 5 +++-- src/CO_Tree_inlines.hh | 10 ++++++---- src/Congruence_System_defs.hh | 3 ++- src/Constraint_System_defs.hh | 3 ++- src/Dense_Row_defs.hh | 5 +++-- src/Generator_System_defs.hh | 3 ++- src/Grid_Generator_System_defs.hh | 3 ++- src/Linear_Expression_Interface_defs.hh | 3 ++- src/Linear_Expression_defs.hh | 3 ++- 10 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/src/CO_Tree.cc b/src/CO_Tree.cc index d8ef8c8..4f90a76 100644 --- a/src/CO_Tree.cc +++ b/src/CO_Tree.cc @@ -954,7 +954,7 @@ PPL::CO_Tree --subtree_size; }
- const ptrdiff_t distance = first_unused_index - indexes; + const std::ptrdiff_t distance = first_unused_index - indexes; PPL_ASSERT(distance >= 0); return static_cast<dimension_type>(distance); } diff --git a/src/CO_Tree_defs.hh b/src/CO_Tree_defs.hh index ec147e7..45d0d8c 100644 --- a/src/CO_Tree_defs.hh +++ b/src/CO_Tree_defs.hh @@ -28,6 +28,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "Coefficient_defs.hh" #include <memory> +#include <cstddef>
#ifndef PPL_CO_TREE_EXTRA_DEBUG #ifdef PPL_ABI_BREAKING_EXTRA_DEBUG @@ -159,7 +160,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category; typedef const data_type value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef data_type_const_reference reference;
@@ -314,7 +315,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category; typedef data_type value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef value_type& reference;
diff --git a/src/CO_Tree_inlines.hh b/src/CO_Tree_inlines.hh index aef1105..dd03248 100644 --- a/src/CO_Tree_inlines.hh +++ b/src/CO_Tree_inlines.hh @@ -24,6 +24,8 @@ site: http://bugseng.com/products/ppl/ . */ #ifndef PPL_CO_Tree_inlines_hh #define PPL_CO_Tree_inlines_hh 1
+#include <cstddef> + namespace Parma_Polyhedra_Library {
inline dimension_type @@ -31,7 +33,7 @@ CO_Tree::dfs_index(const_iterator itr) const { PPL_ASSERT(itr.current_index != 0); PPL_ASSERT(itr.current_index >= indexes + 1); PPL_ASSERT(itr.current_index <= indexes + reserved_size); - const ptrdiff_t index = itr.current_index - indexes; + const std::ptrdiff_t index = itr.current_index - indexes; return static_cast<dimension_type>(index); }
@@ -40,7 +42,7 @@ CO_Tree::dfs_index(iterator itr) const { PPL_ASSERT(itr.current_index != 0); PPL_ASSERT(itr.current_index >= indexes + 1); PPL_ASSERT(itr.current_index <= indexes + reserved_size); - const ptrdiff_t index = itr.current_index - indexes; + const std::ptrdiff_t index = itr.current_index - indexes; return static_cast<dimension_type>(index); }
@@ -772,7 +774,7 @@ CO_Tree::tree_iterator::follow_left_children_with_value() { p -= (offset - 1); while (*p == unused_index) ++p; - const ptrdiff_t distance = p - tree.indexes; + const std::ptrdiff_t distance = p - tree.indexes; PPL_ASSERT(distance >= 0); i = static_cast<dimension_type>(distance); offset = least_significant_one_mask(i); @@ -787,7 +789,7 @@ CO_Tree::tree_iterator::follow_right_children_with_value() { p += (offset - 1); while (*p == unused_index) --p; - const ptrdiff_t distance = p - tree.indexes; + const std::ptrdiff_t distance = p - tree.indexes; PPL_ASSERT(distance >= 0); i = static_cast<dimension_type>(distance); offset = least_significant_one_mask(i); diff --git a/src/Congruence_System_defs.hh b/src/Congruence_System_defs.hh index c7e78c5..ca19884 100644 --- a/src/Congruence_System_defs.hh +++ b/src/Congruence_System_defs.hh @@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ . */ #include "Congruence_defs.hh" #include "Constraint_System_types.hh" #include <iosfwd> +#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -249,7 +250,7 @@ public: class const_iterator : public std::iterator<std::forward_iterator_tag, Congruence, - ptrdiff_t, + std::ptrdiff_t, const Congruence*, const Congruence&> { public: diff --git a/src/Constraint_System_defs.hh b/src/Constraint_System_defs.hh index 7eefddd..69a54fa 100644 --- a/src/Constraint_System_defs.hh +++ b/src/Constraint_System_defs.hh @@ -37,6 +37,7 @@ site: http://bugseng.com/products/ppl/ . */ #include "termination_types.hh" #include <iterator> #include <iosfwd> +#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -609,7 +610,7 @@ for (Constraint_System::const_iterator i = cs.begin(), class Parma_Polyhedra_Library::Constraint_System_const_iterator : public std::iterator<std::forward_iterator_tag, Constraint, - ptrdiff_t, + std::ptrdiff_t, const Constraint*, const Constraint&> { public: diff --git a/src/Dense_Row_defs.hh b/src/Dense_Row_defs.hh index 2463efe..a1eb88f 100644 --- a/src/Dense_Row_defs.hh +++ b/src/Dense_Row_defs.hh @@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ . */ #include <memory> #include <vector> #include <limits> +#include <cstddef>
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS //! A finite sequence of coefficients. @@ -433,7 +434,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category; typedef Coefficient value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef value_type& reference;
@@ -474,7 +475,7 @@ class Parma_Polyhedra_Library::Dense_Row::const_iterator { public:
typedef const Coefficient value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef Coefficient_traits::const_reference reference;
diff --git a/src/Generator_System_defs.hh b/src/Generator_System_defs.hh index 152d4f9..1288d87 100644 --- a/src/Generator_System_defs.hh +++ b/src/Generator_System_defs.hh @@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ . */ #include "Poly_Con_Relation_defs.hh" #include "Polyhedron_types.hh" #include <iosfwd> +#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -679,7 +680,7 @@ copy(gs.begin(), gs.end(), ostream_iterator<Generator>(cout, "\n")); class Parma_Polyhedra_Library::Generator_System_const_iterator : public std::iterator<std::forward_iterator_tag, Generator, - ptrdiff_t, + std::ptrdiff_t, const Generator*, const Generator&> { public: diff --git a/src/Grid_Generator_System_defs.hh b/src/Grid_Generator_System_defs.hh index adc5b8f..25ce6aa 100644 --- a/src/Grid_Generator_System_defs.hh +++ b/src/Grid_Generator_System_defs.hh @@ -31,6 +31,7 @@ site: http://bugseng.com/products/ppl/ . */ #include "Variables_Set_types.hh" #include "Polyhedron_types.hh" #include <iosfwd> +#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -277,7 +278,7 @@ public: class const_iterator : public std::iterator<std::forward_iterator_tag, Grid_Generator, - ptrdiff_t, + std::ptrdiff_t, const Grid_Generator*, const Grid_Generator&> { public: diff --git a/src/Linear_Expression_Interface_defs.hh b/src/Linear_Expression_Interface_defs.hh index 7b7c4cd..7261927 100644 --- a/src/Linear_Expression_Interface_defs.hh +++ b/src/Linear_Expression_Interface_defs.hh @@ -32,6 +32,7 @@ site: http://bugseng.com/products/ppl/ . */ #include "Sparse_Row_types.hh" #include <vector> #include <set> +#include <cstddef>
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS //! A linear expression. @@ -65,7 +66,7 @@ public: public: typedef std::bidirectional_iterator_tag iterator_category; typedef const Coefficient value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef Coefficient_traits::const_reference reference;
diff --git a/src/Linear_Expression_defs.hh b/src/Linear_Expression_defs.hh index 8e8e271..ecda1ae 100644 --- a/src/Linear_Expression_defs.hh +++ b/src/Linear_Expression_defs.hh @@ -51,6 +51,7 @@ site: http://bugseng.com/products/ppl/ . */
#include "Linear_Expression_Interface_defs.hh" #include "Variable_defs.hh" +#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -381,7 +382,7 @@ public: public: typedef std::bidirectional_iterator_tag iterator_category; typedef const Coefficient value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef Coefficient_traits::const_reference reference;
participants (1)
-
Roberto Bagnara