#8644 closed Bugs (fixed)
Regression in alternative enum based implementation
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | Boost 1.54.0 | Component: | static_assert |
Version: | Boost Release Branch | Severity: | Regression |
Keywords: | Cc: |
Description
It seems to be wrong definition of alternative enum based implementation, which is introduced at [82886].
After [82886]:
#else // alternative enum based implementation: # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) \ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) } # else enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } # endif #endif #endif // defined(BOOST_NO_CXX11_STATIC_ASSERT)
But should be this:
#else
// alternative enum based implementation:
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
# define BOOST_STATIC_ASSERT( ... ) \
enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
= sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) }
# else
+# define BOOST_STATIC_ASSERT( B ) \
enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
= sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
# endif
#endif
#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT)
This bug affects 1.54 release branch.
Change History (3)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [84686]) Apply patch from #8644. Refs #8644.