Add expected sizeof test to detect any unwanted growth when refactoring

This commit is contained in:
Ion Gaztañaga
2026-02-02 23:02:21 +01:00
parent 56268e7a18
commit 17c4c688e5
11 changed files with 39 additions and 2 deletions

View File

@@ -379,6 +379,10 @@ void test_merge_from_different_comparison()
set1.merge(set2);
}
//Test the expected sizeof()
BOOST_CONTAINER_STATIC_ASSERT_MSG(4*sizeof(void*) == sizeof(set<int>), "sizeof has an unexpected value");
BOOST_CONTAINER_STATIC_ASSERT_MSG(4*sizeof(void*) == sizeof(multiset<int>), "sizeof has an unexpected value");
int main ()
{
using namespace boost::container::test;