mirror of
https://github.com/boostorg/static_assert.git
synced 2026-01-25 06:42:18 +00:00
Compare commits
36 Commits
svn-branch
...
boost-1.65
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afe9e9d786 | ||
|
|
87f3be4a8f | ||
|
|
46e0bd762c | ||
|
|
8cd6ce7829 | ||
|
|
bb3cc11f09 | ||
|
|
15c38db1d2 | ||
|
|
41f9c4b99c | ||
|
|
d2f57474a7 | ||
|
|
29a7d491b8 | ||
|
|
4aab0b78c3 | ||
|
|
d215ee5c9c | ||
|
|
f2b7643595 | ||
|
|
bc29f7ab62 | ||
|
|
41521344af | ||
|
|
5233df9b9e | ||
|
|
7d9fdaee13 | ||
|
|
06dedcd232 | ||
|
|
6f1d2476fa | ||
|
|
e27a27c9f3 | ||
|
|
12f96b5653 | ||
|
|
23d7abde22 | ||
|
|
9e4d6dfeff | ||
|
|
2637358ba9 | ||
|
|
9e411076c6 | ||
|
|
3488b2bdf2 | ||
|
|
28e09a3cca | ||
|
|
481c2efbac | ||
|
|
3b702727b9 | ||
|
|
f298ed51a9 | ||
|
|
851fd2622e | ||
|
|
720fb456d5 | ||
|
|
2fa11699bf | ||
|
|
69dbf6f12d | ||
|
|
66dd3d2595 | ||
|
|
7a0a3fbf32 | ||
|
|
c5de8ff789 |
@@ -37,3 +37,13 @@ boostbook standalone
|
||||
<format>pdf:<xsl:param>admon.graphics.path=$(boost-images)/
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
|
||||
;
|
||||
|
||||
###############################################################################
|
||||
alias boostdoc
|
||||
: static_assert
|
||||
:
|
||||
:
|
||||
: ;
|
||||
explicit boostdoc ;
|
||||
alias boostrelease ;
|
||||
explicit boostrelease ;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
|
||||
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg )
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
|
||||
@@ -64,14 +64,6 @@
|
||||
# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
|
||||
# endif
|
||||
#endif
|
||||
//
|
||||
// If the compiler warns about unused typedefs then enable this:
|
||||
//
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
|
||||
# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
|
||||
#else
|
||||
# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
@@ -117,14 +109,7 @@ template<int x> struct static_assert_test{};
|
||||
//
|
||||
#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS)
|
||||
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
||||
// __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)
|
||||
#if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
|
||||
#define BOOST_STATIC_ASSERT( B ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\
|
||||
@@ -167,12 +152,12 @@ template<int x> struct static_assert_test{};
|
||||
# define BOOST_STATIC_ASSERT( ... ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT( B ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
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