From: David Wells Date: Fri, 15 Dec 2017 15:53:07 +0000 (-0500) Subject: Let GrowingVectorMemory work with std::vector. X-Git-Tag: v9.0.0-rc1~656^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5628%2Fhead;p=dealii.git Let GrowingVectorMemory work with std::vector. The VectorType class in std::pair> may not have a memory_consumption() member function (e.g., std::vector). Get around this by just using the free function instead. --- diff --git a/include/deal.II/lac/vector_memory.templates.h b/include/deal.II/lac/vector_memory.templates.h index 4bd60279c3..41dac85989 100644 --- a/include/deal.II/lac/vector_memory.templates.h +++ b/include/deal.II/lac/vector_memory.templates.h @@ -17,8 +17,10 @@ #define dealii_vector_memory_templates_h -#include #include +#include + +#include DEAL_II_NAMESPACE_OPEN @@ -181,7 +183,7 @@ GrowingVectorMemory::memory_consumption () const end = pool.data->end(); for (typename std::vector::const_iterator i = pool.data->begin(); i != end ; ++i) - result += sizeof (*i) + i->second->memory_consumption(); + result += sizeof (*i) + MemoryConsumption::memory_consumption(i->second); return result; }