Added constant static_vector<>/small_vector::static_capacity to use the configured capacity in constant expressions.

This commit is contained in:
Ion Gaztañaga
2016-08-03 00:18:11 +02:00
parent 649aba461e
commit 4122e722a4
5 changed files with 16 additions and 3 deletions
+2
View File
@@ -65,6 +65,7 @@ bool test_small_vector_base_test()
typedef boost::container::small_vector_base<int> smb_t;
{
typedef boost::container::small_vector<int, 5> sm5_t;
BOOST_STATIC_ASSERT(sm5_t::static_capacity == 5);
sm5_t sm5;
smb_t &smb = sm5;
smb.push_back(1);
@@ -75,6 +76,7 @@ bool test_small_vector_base_test()
}
{
typedef boost::container::small_vector<int, 7> sm7_t;
BOOST_STATIC_ASSERT(sm7_t::static_capacity == 7);
sm7_t sm7;
smb_t &smb = sm7;
smb.push_back(2);