On Sat, Oct 16, 2021 at 3:16 PM Peter Dimov wrote:
Glen Fernandes wrote:
On Sat, Oct 16, 2021 at 2:19 PM John Maddock wrote:
This is fine by me, I imagine that Boost.StaticAssert is rapidly becoming obsolete anyway?
Not everyone is on C++17 to use static_assert(expr), so even C++11 and C++14 Boost libraries (and some Boost users) choose BOOST_STATIC_ASSERT(expr) over having to static_assert(expr, "expr") etc.
That's true, but the implementation can be simplified considerably if C++11 can be assumed. :-)
No argument there. In some sense, we're in that happy place now already - i.e. it is simplified, when C++11 is assumed: #ifndef BOOST_NO_CXX11_STATIC_ASSERT # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) # else # define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) # endif #else Everything after that #else is just padding bytes anyway. :) Glen