Fixed Trac #11957: "static_vector::max_size() is higher than the capacity"

This commit is contained in:
Ion Gaztañaga
2016-02-24 14:45:44 +01:00
parent a7158c7975
commit 310d8eaf10
3 changed files with 6 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ void test_ctor_ndc()
static_vector<T, N> s;
BOOST_TEST_EQ(s.size() , 0u);
BOOST_TEST(s.capacity() == N);
BOOST_TEST(s.max_size() == N);
BOOST_TEST_THROWS( s.at(0u), std::out_of_range );
}
@@ -44,6 +45,7 @@ void test_ctor_nc(size_t n)
static_vector<T, N> s(n);
BOOST_TEST(s.size() == n);
BOOST_TEST(s.capacity() == N);
BOOST_TEST(s.max_size() == N);
BOOST_TEST_THROWS( s.at(n), std::out_of_range );
if ( 1 < n )
{