forked from boostorg/bind
Rvalue-allowing overloads for one/two arguments added.
[SVN r31470]
This commit is contained in:
@@ -38,6 +38,22 @@
|
|||||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
|
||||||
|
|
||||||
|
template<class A1> result_type operator()(A1 const & a1)
|
||||||
|
{
|
||||||
|
list1<A1 const &> a(a1);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class A1> result_type operator()(A1 const & a1) const
|
||||||
|
{
|
||||||
|
list1<A1 const &> a(a1);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2)
|
template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2)
|
||||||
{
|
{
|
||||||
list2<A1 &, A2 &> a(a1, a2);
|
list2<A1 &, A2 &> a(a1, a2);
|
||||||
@@ -50,6 +66,48 @@
|
|||||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
|
||||||
|
|
||||||
|
template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2)
|
||||||
|
{
|
||||||
|
list2<A1 const &, A2 &> a(a1, a2);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2) const
|
||||||
|
{
|
||||||
|
list2<A1 const &, A2 &> a(a1, a2);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2)
|
||||||
|
{
|
||||||
|
list2<A1 &, A2 const &> a(a1, a2);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2) const
|
||||||
|
{
|
||||||
|
list2<A1 &, A2 const &> a(a1, a2);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2)
|
||||||
|
{
|
||||||
|
list2<A1 const &, A2 const &> a(a1, a2);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2) const
|
||||||
|
{
|
||||||
|
list2<A1 const &, A2 const &> a(a1, a2);
|
||||||
|
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3)
|
template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3)
|
||||||
{
|
{
|
||||||
list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
|
list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
|
||||||
|
Reference in New Issue
Block a user