Add tests for BOOST_CORE_STATIC_ASSERT

This commit is contained in:
Peter Dimov
2025-10-20 18:57:38 +03:00
parent 82a16ccc95
commit aaff2c0d54
8 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
// Copyright 2025 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/core/static_assert.hpp>
BOOST_CORE_STATIC_ASSERT( sizeof(char[1]) == 1 );
struct X
{
BOOST_CORE_STATIC_ASSERT( sizeof(char[2]) == 2 );
};
int main()
{
BOOST_CORE_STATIC_ASSERT( sizeof(char[3]) == 3 );
}