Files
core/test/static_assert_test.cpp

18 lines
364 B
C++
Raw Normal View History

2025-10-20 18:57:38 +03:00
// 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 );
}