Skip to content

Commit

Permalink
More workaround removal in bind.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 4, 2024
1 parent 42c7177 commit 9140f3e
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions include/boost/bind/bind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@ namespace _bi // implementation details

// ref_compare

template<class T> bool ref_compare( T const & a, T const & b, long )
template<class T> bool ref_compare( T const & a, T const & b )
{
return a == b;
}

template<int I> bool ref_compare( arg<I> const &, arg<I> const &, int )
template<int I> bool ref_compare( arg<I> const &, arg<I> const & )
{
return true;
}

template<int I> bool ref_compare( arg<I> (*) (), arg<I> (*) (), int )
template<int I> bool ref_compare( arg<I> (*) (), arg<I> (*) () )
{
return true;
}

template<class T> bool ref_compare( reference_wrapper<T> const & a, reference_wrapper<T> const & b, int )
template<class T> bool ref_compare( reference_wrapper<T> const & a, reference_wrapper<T> const & b )
{
return a.get_pointer() == b.get_pointer();
}
Expand All @@ -74,7 +74,7 @@ template<class T> bool ref_compare( reference_wrapper<T> const & a, reference_wr

template<class R, class F, class L> class bind_t;

template<class R, class F, class L> bool ref_compare( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b, int )
template<class R, class F, class L> bool ref_compare( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b )
{
return a.compare( b );
}
Expand Down Expand Up @@ -102,7 +102,7 @@ template<class T> class value

// ref_compare for weak_ptr

template<class T> bool ref_compare( value< weak_ptr<T> > const & a, value< weak_ptr<T> > const & b, int )
template<class T> bool ref_compare( value< weak_ptr<T> > const & a, value< weak_ptr<T> > const & b )
{
return !(a.get() < b.get()) && !(b.get() < a.get());
}
Expand Down Expand Up @@ -237,7 +237,7 @@ template< class A1 > class list1: private storage1< A1 >

bool operator==(list1 const & rhs) const
{
return ref_compare(base_type::a1_, rhs.a1_, 0);
return ref_compare(base_type::a1_, rhs.a1_);
}
};

Expand Down Expand Up @@ -317,7 +317,7 @@ template< class A1, class A2 > class list2: private storage2< A1, A2 >

bool operator==(list2 const & rhs) const
{
return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0);
return ref_compare(base_type::a1_, rhs.a1_) && ref_compare(base_type::a2_, rhs.a2_);
}
};

Expand Down Expand Up @@ -378,9 +378,9 @@ template< class A1, class A2, class A3 > class list3: private storage3< A1, A2,
{
return

ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
ref_compare( base_type::a3_, rhs.a3_, 0 );
ref_compare( base_type::a1_, rhs.a1_ ) &&
ref_compare( base_type::a2_, rhs.a2_ ) &&
ref_compare( base_type::a3_, rhs.a3_ );
}
};

Expand Down Expand Up @@ -443,10 +443,10 @@ template< class A1, class A2, class A3, class A4 > class list4: private storage4
{
return

ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
ref_compare( base_type::a4_, rhs.a4_, 0 );
ref_compare( base_type::a1_, rhs.a1_ ) &&
ref_compare( base_type::a2_, rhs.a2_ ) &&
ref_compare( base_type::a3_, rhs.a3_ ) &&
ref_compare( base_type::a4_, rhs.a4_ );
}
};

Expand Down Expand Up @@ -511,11 +511,11 @@ template< class A1, class A2, class A3, class A4, class A5 > class list5: privat
{
return

ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
ref_compare( base_type::a5_, rhs.a5_, 0 );
ref_compare( base_type::a1_, rhs.a1_ ) &&
ref_compare( base_type::a2_, rhs.a2_ ) &&
ref_compare( base_type::a3_, rhs.a3_ ) &&
ref_compare( base_type::a4_, rhs.a4_ ) &&
ref_compare( base_type::a5_, rhs.a5_ );
}
};

Expand Down Expand Up @@ -582,12 +582,12 @@ template<class A1, class A2, class A3, class A4, class A5, class A6> class list6
{
return

ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
ref_compare( base_type::a6_, rhs.a6_, 0 );
ref_compare( base_type::a1_, rhs.a1_ ) &&
ref_compare( base_type::a2_, rhs.a2_ ) &&
ref_compare( base_type::a3_, rhs.a3_ ) &&
ref_compare( base_type::a4_, rhs.a4_ ) &&
ref_compare( base_type::a5_, rhs.a5_ ) &&
ref_compare( base_type::a6_, rhs.a6_ );
}
};

Expand Down Expand Up @@ -656,13 +656,13 @@ template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> c
{
return

ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
ref_compare( base_type::a6_, rhs.a6_, 0 ) &&
ref_compare( base_type::a7_, rhs.a7_, 0 );
ref_compare( base_type::a1_, rhs.a1_ ) &&
ref_compare( base_type::a2_, rhs.a2_ ) &&
ref_compare( base_type::a3_, rhs.a3_ ) &&
ref_compare( base_type::a4_, rhs.a4_ ) &&
ref_compare( base_type::a5_, rhs.a5_ ) &&
ref_compare( base_type::a6_, rhs.a6_ ) &&
ref_compare( base_type::a7_, rhs.a7_ );
}
};

Expand Down Expand Up @@ -733,14 +733,14 @@ template< class A1, class A2, class A3, class A4, class A5, class A6, class A7,
{
return

ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
ref_compare( base_type::a6_, rhs.a6_, 0 ) &&
ref_compare( base_type::a7_, rhs.a7_, 0 ) &&
ref_compare( base_type::a8_, rhs.a8_, 0 );
ref_compare( base_type::a1_, rhs.a1_ ) &&
ref_compare( base_type::a2_, rhs.a2_ ) &&
ref_compare( base_type::a3_, rhs.a3_ ) &&
ref_compare( base_type::a4_, rhs.a4_ ) &&
ref_compare( base_type::a5_, rhs.a5_ ) &&
ref_compare( base_type::a6_, rhs.a6_ ) &&
ref_compare( base_type::a7_, rhs.a7_ ) &&
ref_compare( base_type::a8_, rhs.a8_ );
}
};

Expand Down Expand Up @@ -813,15 +813,15 @@ template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, c
{
return

ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
ref_compare( base_type::a6_, rhs.a6_, 0 ) &&
ref_compare( base_type::a7_, rhs.a7_, 0 ) &&
ref_compare( base_type::a8_, rhs.a8_, 0 ) &&
ref_compare( base_type::a9_, rhs.a9_, 0 );
ref_compare( base_type::a1_, rhs.a1_ ) &&
ref_compare( base_type::a2_, rhs.a2_ ) &&
ref_compare( base_type::a3_, rhs.a3_ ) &&
ref_compare( base_type::a4_, rhs.a4_ ) &&
ref_compare( base_type::a5_, rhs.a5_ ) &&
ref_compare( base_type::a6_, rhs.a6_ ) &&
ref_compare( base_type::a7_, rhs.a7_ ) &&
ref_compare( base_type::a8_, rhs.a8_ ) &&
ref_compare( base_type::a9_, rhs.a9_ );
}
};

Expand Down Expand Up @@ -1393,7 +1393,7 @@ template<class R, class F, class L> class bind_t

bool compare( this_type const & rhs ) const
{
return ref_compare( f_, rhs.f_, 0 ) && l_ == rhs.l_;
return ref_compare( f_, rhs.f_ ) && l_ == rhs.l_;
}
};

Expand Down

0 comments on commit 9140f3e

Please sign in to comment.