Skip to content

Commit

Permalink
Remove use of BOOST_STATIC_ASSERT_MSG
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Sep 25, 2024
1 parent abb0071 commit 1230402
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/boost/pointer_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/type_traits/has_virtual_destructor.hpp>
#include <boost/static_assert.hpp>
#include <boost/config.hpp>
#include <memory>

Expand Down Expand Up @@ -81,7 +80,7 @@ template<class T, class U> std::unique_ptr<T> dynamic_pointer_cast( std::unique_
{
(void) dynamic_cast< T* >( static_cast< U* >( 0 ) );

BOOST_STATIC_ASSERT_MSG( boost::has_virtual_destructor<T>::value, "The target of dynamic_pointer_cast must have a virtual destructor." );
static_assert( boost::has_virtual_destructor<T>::value, "The target of dynamic_pointer_cast must have a virtual destructor." );

T * p = dynamic_cast<T*>( r.get() );
if( p ) r.release();
Expand Down

0 comments on commit 1230402

Please sign in to comment.