
Module: ppl/ppl Branch: floating_point Commit: 4a26e69ad62c5c2b9d256f20392289d3161fc7bb URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=4a26e69ad62c5...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Thu Jul 29 11:24:08 2010 +0200
Fixed a bug in DB_Row_Impl_Handler<T>::Impl::expand_within_capacity(dimension_type). This affected only compilers not supporting flexible arrays.
---
src/DB_Row.templates.hh | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/DB_Row.templates.hh b/src/DB_Row.templates.hh index e886b61..8684c04 100644 --- a/src/DB_Row.templates.hh +++ b/src/DB_Row.templates.hh @@ -58,9 +58,11 @@ DB_Row_Impl_Handler<T>:: Impl::expand_within_capacity(const dimension_type new_size) { PPL_ASSERT(size() <= new_size && new_size <= max_size()); #if !PPL_CXX_SUPPORTS_FLEXIBLE_ARRAYS - // vec_[0] is already constructed. - if (size() == 0 && new_size > 0) + if (size() == 0 && new_size > 0) { + // vec_[0] is already constructed: we just need to assign +infinity. + assign_r(vec_[0], PLUS_INFINITY, ROUND_NOT_NEEDED); bump_size(); + } #endif // Construct in direct order: will destroy in reverse order. for (dimension_type i = size(); i < new_size; ++i) {