PKGBUILDs/extra/boost/boost-1.58.0-Fix-for-bind-void-mf-ambiguous-resolution-error.patch
2015-05-30 12:42:10 +00:00

354 lines
19 KiB
Diff

From 150c4e94e3f6aadc84f551accdb49b6658bfb539 Mon Sep 17 00:00:00 2001
From: K-ballo <k@fusionfenix.com>
Date: Wed, 29 Apr 2015 13:11:41 -0300
Subject: [PATCH] Fix for bind<void>(mf) ambiguous resolution error
---
include/boost/bind/bind.hpp | 2 ++
include/boost/bind/bind_mf_cc.hpp | 54 ++++++++++++++++++++++++++-------------
test/bind_void_mf_test.cpp | 27 ++++++++++++++++++++
3 files changed, 65 insertions(+), 18 deletions(-)
diff --git a/include/boost/bind/bind.hpp b/include/boost/bind/bind.hpp
index 924d055..fd05131 100644
--- a/include/boost/bind/bind.hpp
+++ b/include/boost/bind/bind.hpp
@@ -29,6 +29,8 @@
#include <boost/bind/arg.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/visit_each.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/core/is_same.hpp>
// Borland-specific bug, visit_each() silently fails to produce code
diff --git a/include/boost/bind/bind_mf_cc.hpp b/include/boost/bind/bind_mf_cc.hpp
index 9c3d290..e149384 100644
--- a/include/boost/bind/bind_mf_cc.hpp
+++ b/include/boost/bind/bind_mf_cc.hpp
@@ -36,8 +36,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class A1>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type;
@@ -46,8 +47,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class A1>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type;
@@ -81,8 +83,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1,
class A1, class A2>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type;
@@ -92,8 +95,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1,
class A1, class A2>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type;
@@ -127,8 +131,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1, class B2,
class A1, class A2, class A3>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@@ -138,8 +143,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1, class B2,
class A1, class A2, class A3>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@@ -173,8 +179,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3,
class A1, class A2, class A3, class A4>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@@ -184,8 +191,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3,
class A1, class A2, class A3, class A4>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@@ -219,8 +227,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4, class A5>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@@ -230,8 +239,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4, class A5>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@@ -265,8 +275,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5, class A6>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@@ -276,8 +287,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5, class A6>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@@ -311,8 +323,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@@ -322,8 +335,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@@ -357,8 +371,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@@ -368,8 +383,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@@ -403,8 +419,9 @@ template<class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
@@ -414,8 +431,9 @@ template<class Rt2, class R, class T,
template<class Rt2, class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+ typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
- BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+ >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
diff --git a/boost/libs/bind/test/bind_void_mf_test.cpp b/boost/libs/bind/test/bind_void_mf_test.cpp
index 62c2dcd..e66a9c8 100644
--- a/boost/libs/bind/test/bind_void_mf_test.cpp
+++ b/boost/libs/bind/test/bind_void_mf_test.cpp
@@ -47,30 +47,39 @@ struct X
int f0() { f1(17); return 0; }
int g0() const { g1(17); return 0; }
+ void h0() { h1(17); }
int f1(int a1) { hash = (hash * 17041 + a1) % 32768; return 0; }
int g1(int a1) const { hash = (hash * 17041 + a1 * 2) % 32768; return 0; }
+ void h1(int a1) { hash = (hash * 17041 + a1 * 2) % 32768; }
int f2(int a1, int a2) { f1(a1); f1(a2); return 0; }
int g2(int a1, int a2) const { g1(a1); g1(a2); return 0; }
+ void h2(int a1, int a2) { h1(a1); h1(a2); }
int f3(int a1, int a2, int a3) { f2(a1, a2); f1(a3); return 0; }
int g3(int a1, int a2, int a3) const { g2(a1, a2); g1(a3); return 0; }
+ void h3(int a1, int a2, int a3) { h2(a1, a2); h1(a3); }
int f4(int a1, int a2, int a3, int a4) { f3(a1, a2, a3); f1(a4); return 0; }
int g4(int a1, int a2, int a3, int a4) const { g3(a1, a2, a3); g1(a4); return 0; }
+ void h4(int a1, int a2, int a3, int a4) { h3(a1, a2, a3); h1(a4); }
int f5(int a1, int a2, int a3, int a4, int a5) { f4(a1, a2, a3, a4); f1(a5); return 0; }
int g5(int a1, int a2, int a3, int a4, int a5) const { g4(a1, a2, a3, a4); g1(a5); return 0; }
+ void h5(int a1, int a2, int a3, int a4, int a5) { h4(a1, a2, a3, a4); h1(a5); }
int f6(int a1, int a2, int a3, int a4, int a5, int a6) { f5(a1, a2, a3, a4, a5); f1(a6); return 0; }
int g6(int a1, int a2, int a3, int a4, int a5, int a6) const { g5(a1, a2, a3, a4, a5); g1(a6); return 0; }
+ void h6(int a1, int a2, int a3, int a4, int a5, int a6) { h5(a1, a2, a3, a4, a5); h1(a6); }
int f7(int a1, int a2, int a3, int a4, int a5, int a6, int a7) { f6(a1, a2, a3, a4, a5, a6); f1(a7); return 0; }
int g7(int a1, int a2, int a3, int a4, int a5, int a6, int a7) const { g6(a1, a2, a3, a4, a5, a6); g1(a7); return 0; }
+ void h7(int a1, int a2, int a3, int a4, int a5, int a6, int a7) { h6(a1, a2, a3, a4, a5, a6); h1(a7); }
int f8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { f7(a1, a2, a3, a4, a5, a6, a7); f1(a8); return 0; }
int g8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) const { g7(a1, a2, a3, a4, a5, a6, a7); g1(a8); return 0; }
+ void h8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { h7(a1, a2, a3, a4, a5, a6, a7); h1(a8); }
};
void member_function_test()
@@ -88,6 +97,8 @@ void member_function_test()
bind<void>(&X::g0, x)();
bind<void>(&X::g0, ref(x))();
+ bind<void>(&X::h0, x)();
+
// 1
bind<void>(&X::f1, &x, 1)();
@@ -97,6 +108,8 @@ void member_function_test()
bind<void>(&X::g1, x, 1)();
bind<void>(&X::g1, ref(x), 1)();
+ bind<void>(&X::h1, x, 1)();
+
// 2
bind<void>(&X::f2, &x, 1, 2)();
@@ -106,6 +119,8 @@ void member_function_test()
bind<void>(&X::g2, x, 1, 2)();
bind<void>(&X::g2, ref(x), 1, 2)();
+ bind<void>(&X::h2, x, 1, 2)();
+
// 3
bind<void>(&X::f3, &x, 1, 2, 3)();
@@ -115,6 +130,8 @@ void member_function_test()
bind<void>(&X::g3, x, 1, 2, 3)();
bind<void>(&X::g3, ref(x), 1, 2, 3)();
+ bind<void>(&X::h3, x, 1, 2, 3)();
+
// 4
bind<void>(&X::f4, &x, 1, 2, 3, 4)();
@@ -124,6 +141,8 @@ void member_function_test()
bind<void>(&X::g4, x, 1, 2, 3, 4)();
bind<void>(&X::g4, ref(x), 1, 2, 3, 4)();
+ bind<void>(&X::h4, x, 1, 2, 3, 4)();
+
// 5
bind<void>(&X::f5, &x, 1, 2, 3, 4, 5)();
@@ -133,6 +152,8 @@ void member_function_test()
bind<void>(&X::g5, x, 1, 2, 3, 4, 5)();
bind<void>(&X::g5, ref(x), 1, 2, 3, 4, 5)();
+ bind<void>(&X::h5, x, 1, 2, 3, 4, 5)();
+
// 6
bind<void>(&X::f6, &x, 1, 2, 3, 4, 5, 6)();
@@ -142,6 +163,8 @@ void member_function_test()
bind<void>(&X::g6, x, 1, 2, 3, 4, 5, 6)();
bind<void>(&X::g6, ref(x), 1, 2, 3, 4, 5, 6)();
+ bind<void>(&X::h6, x, 1, 2, 3, 4, 5, 6)();
+
// 7
bind<void>(&X::f7, &x, 1, 2, 3, 4, 5, 6, 7)();
@@ -151,6 +174,8 @@ void member_function_test()
bind<void>(&X::g7, x, 1, 2, 3, 4, 5, 6, 7)();
bind<void>(&X::g7, ref(x), 1, 2, 3, 4, 5, 6, 7)();
+ bind<void>(&X::h7, x, 1, 2, 3, 4, 5, 6, 7)();
+
// 8
bind<void>(&X::f8, &x, 1, 2, 3, 4, 5, 6, 7, 8)();
@@ -160,6 +185,8 @@ void member_function_test()
bind<void>(&X::g8, x, 1, 2, 3, 4, 5, 6, 7, 8)();
bind<void>(&X::g8, ref(x), 1, 2, 3, 4, 5, 6, 7, 8)();
+ bind<void>(&X::h8, x, 1, 2, 3, 4, 5, 6, 7, 8)();
+
BOOST_TEST( x.hash == 23558 );
}
--
2.4.1