Skip to content

Commit

Permalink
Remove detail/operator_bool.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Sep 25, 2024
1 parent f11b931 commit 000c7ae
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 30 deletions.
18 changes: 0 additions & 18 deletions include/boost/smart_ptr/detail/operator_bool.hpp

This file was deleted.

6 changes: 4 additions & 2 deletions include/boost/smart_ptr/intrusive_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ template<class T> class intrusive_ptr
return px;
}

// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}

void swap(intrusive_ptr & rhs) BOOST_SP_NOEXCEPT
{
Expand Down
6 changes: 4 additions & 2 deletions include/boost/smart_ptr/local_shared_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,10 @@ template<class T> class local_shared_ptr
return px;
}

// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}

long local_use_count() const BOOST_SP_NOEXCEPT
{
Expand Down
6 changes: 4 additions & 2 deletions include/boost/smart_ptr/scoped_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ template<class T> class scoped_array // noncopyable
return px;
}

// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}

void swap(scoped_array & b) BOOST_SP_NOEXCEPT
{
Expand Down
6 changes: 4 additions & 2 deletions include/boost/smart_ptr/scoped_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ template<class T> class scoped_ptr // noncopyable
return px;
}

// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}

void swap(scoped_ptr & b) BOOST_SP_NOEXCEPT
{
Expand Down
6 changes: 4 additions & 2 deletions include/boost/smart_ptr/shared_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ template<class T> class shared_array
return px;
}

// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}

bool unique() const BOOST_SP_NOEXCEPT
{
Expand Down
6 changes: 4 additions & 2 deletions include/boost/smart_ptr/shared_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,10 @@ template<class T> class shared_ptr
return px;
}

// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}

bool unique() const BOOST_SP_NOEXCEPT
{
Expand Down

0 comments on commit 000c7ae

Please sign in to comment.