From b985f5a5615b3445abb26de82ae1dfe42fec34ce Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sat, 15 Dec 2012 20:55:38 +0000 Subject: [PATCH] Added assertion in static_vector. [SVN r81980] --- include/boost/geometry/extensions/index/static_vector.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/geometry/extensions/index/static_vector.hpp b/include/boost/geometry/extensions/index/static_vector.hpp index 3a66287aa..11599461b 100644 --- a/include/boost/geometry/extensions/index/static_vector.hpp +++ b/include/boost/geometry/extensions/index/static_vector.hpp @@ -314,7 +314,10 @@ private: try { for ( ; first != last ; ++it, ++first, ++s ) + { + BOOST_ASSERT_MSG(s < Capacity, "size can't exceed the capacity"); this->uninitialized_fill(it, *first); // may throw + } m_size = s; // update end } catch(...)