mirror of
https://github.com/boostorg/static_assert.git
synced 2025-07-31 05:07:19 +02:00
Merge branch 'develop'
This commit is contained in:
@ -30,7 +30,7 @@
|
|||||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||||
# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|
# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|
||||||
# else
|
# else
|
||||||
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
|
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg )
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
|
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
|
||||||
@ -67,7 +67,7 @@
|
|||||||
//
|
//
|
||||||
// If the compiler warns about unused typedefs then enable this:
|
// If the compiler warns about unused typedefs then enable this:
|
||||||
//
|
//
|
||||||
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
|
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||||
# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
|
# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
|
||||||
#else
|
#else
|
||||||
# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
|
# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
|
||||||
@ -117,14 +117,7 @@ template<int x> struct static_assert_test{};
|
|||||||
//
|
//
|
||||||
#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS)
|
#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS)
|
||||||
|
|
||||||
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
#if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
|
||||||
// __LINE__ macro broken when -ZI is used see Q199057
|
|
||||||
// fortunately MSVC ignores duplicate typedef's.
|
|
||||||
#define BOOST_STATIC_ASSERT( B ) \
|
|
||||||
typedef ::boost::static_assert_test<\
|
|
||||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)\
|
|
||||||
> boost_static_assert_typedef_
|
|
||||||
#elif defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
|
|
||||||
#define BOOST_STATIC_ASSERT( B ) \
|
#define BOOST_STATIC_ASSERT( B ) \
|
||||||
typedef ::boost::static_assert_test<\
|
typedef ::boost::static_assert_test<\
|
||||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\
|
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\
|
||||||
|
16
meta/libraries.json
Normal file
16
meta/libraries.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"key": "static_assert",
|
||||||
|
"name": "Static Assert",
|
||||||
|
"authors": [
|
||||||
|
"John Maddock"
|
||||||
|
],
|
||||||
|
"description": "Static assertions (compile time assertions).",
|
||||||
|
"category": [
|
||||||
|
"Correctness",
|
||||||
|
"Generic",
|
||||||
|
"Metaprogramming"
|
||||||
|
],
|
||||||
|
"maintainers": [
|
||||||
|
"John Maddock <john -at- johnmaddock.co.uk>"
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user