From c0ccad469ec22673d6bc23a19de69db4f0e57448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 12 Jan 2017 14:48:09 +0100 Subject: [PATCH] Add constant for capacity in tests --- test/static_vector_test.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/static_vector_test.cpp b/test/static_vector_test.cpp index df03834..a80d0de 100644 --- a/test/static_vector_test.cpp +++ b/test/static_vector_test.cpp @@ -650,10 +650,13 @@ void test_sv_elem(T const& t) bool default_init_test()//Test for default initialization { - typedef static_vector di_vector_t; - const std::size_t Capacity = 100; + typedef static_vector di_vector_t; + + { + di_vector_t v(Capacity, default_init); + } { di_vector_t v; int *p = v.data(); @@ -662,7 +665,7 @@ bool default_init_test()//Test for default initialization *p = static_cast(i); } - //Destroy the vector, p stilll pointing to the storage + //Destroy the vector, p still pointing to the storage v.~di_vector_t(); di_vector_t &rv = *::new(&v)di_vector_t(Capacity, default_init);