Skip to content

Commit

Permalink
Replaced leftover BOOST_STATIC_ASSERT_MSGs with static_assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lastique committed Oct 10, 2024
1 parent c126392 commit 440b160
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/boost/log/detail/named_scope_fmt_pp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ BOOST_FORCEINLINE format_named_scope_actor<
>
format_named_scope(attribute_keyword< DescriptorT, ActorT > const& keyword, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg))
{
BOOST_STATIC_ASSERT_MSG((is_same< typename DescriptorT::value_type, attributes::named_scope::value_type >::value),\
static_assert(is_same< typename DescriptorT::value_type, attributes::named_scope::value_type >::value,
"Boost.Log: Named scope formatter only accepts attribute values of type attributes::named_scope::value_type.");

typedef typename boost::log::aux::deduce_char_type<
Expand All @@ -68,7 +68,7 @@ BOOST_FORCEINLINE format_named_scope_actor<
>
format_named_scope(attribute_actor< T, FallbackPolicyT, TagT, ActorT > const& placeholder, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg))
{
BOOST_STATIC_ASSERT_MSG((is_same< T, attributes::named_scope::value_type >::value),\
static_assert(is_same< T, attributes::named_scope::value_type >::value,
"Boost.Log: Named scope formatter only accepts attribute values of type attributes::named_scope::value_type.");

typedef typename boost::log::aux::deduce_char_type<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <new>
#include <memory>
#include <map>
#include <boost/ref.hpp>
#include <boost/type_index.hpp>
#include <boost/core/ref.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
#include <boost/log/detail/config.hpp>
Expand Down Expand Up @@ -63,7 +63,7 @@ class dynamic_type_dispatcher :
{
this->m_pVisitor = (void*)boost::addressof(m_Visitor);
typedef void (*trampoline_t)(void*, T const&);
BOOST_STATIC_ASSERT_MSG(sizeof(trampoline_t) == sizeof(void*), "Boost.Log: Unsupported platform, the size of a function pointer differs from the size of a pointer");
static_assert(sizeof(trampoline_t) == sizeof(void*), "Boost.Log: Unsupported platform, the size of a function pointer differs from the size of a pointer");
union
{
void* as_pvoid;
Expand Down

0 comments on commit 440b160

Please sign in to comment.