diff --git a/include/boost/bind/bind.hpp b/include/boost/bind/bind.hpp index fd0ee14..22abf5d 100644 --- a/include/boost/bind/bind.hpp +++ b/include/boost/bind/bind.hpp @@ -1416,7 +1416,7 @@ public: } }; -#elif !defined( BOOST_NO_VOID_RETURNS ) +#else template class bind_t { @@ -1426,61 +1426,7 @@ public: bind_t(F f, L const & l): f_(f), l_(l) {} -#define BOOST_BIND_RETURN return #include -#undef BOOST_BIND_RETURN - -}; - -#else // no void returns - -template struct bind_t_generator -{ - -template class implementation -{ -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN return -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template<> struct bind_t_generator -{ - -template class implementation -{ -private: - - typedef void R; - -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation -{ -public: - - bind_t(F f, L const & l): bind_t_generator::BOOST_NESTED_TEMPLATE implementation(f, l) {} }; diff --git a/include/boost/bind/bind_template.hpp b/include/boost/bind/bind_template.hpp index 212ced7..5accce6 100644 --- a/include/boost/bind/bind_template.hpp +++ b/include/boost/bind/bind_template.hpp @@ -17,25 +17,25 @@ result_type operator()() { list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } result_type operator()() const { list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1) { list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1) const { list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -44,13 +44,13 @@ template result_type operator()(A1 const & a1) { list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1) const { list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -58,13 +58,13 @@ template result_type operator()(A1 & a1, A2 & a2) { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2) const { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -73,39 +73,39 @@ template result_type operator()(A1 const & a1, A2 & a2) { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 & a2) const { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 const & a2) { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 const & a2) const { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2) { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2) const { list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -113,13 +113,13 @@ template result_type operator()(A1 & a1, A2 & a2, A3 & a3) { list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const { list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -128,13 +128,13 @@ template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) { list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const { list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -142,13 +142,13 @@ template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) { list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const { list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -157,13 +157,13 @@ template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) { list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const { list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -171,13 +171,13 @@ template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) { list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const { list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -186,13 +186,13 @@ template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) { list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const { list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -200,13 +200,13 @@ template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) { list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const { list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -215,13 +215,13 @@ template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) { list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const { list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -229,13 +229,13 @@ template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) { list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const { list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -244,13 +244,13 @@ template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) { list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const { list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -258,13 +258,13 @@ template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -273,13 +273,13 @@ template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif @@ -287,13 +287,13 @@ template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ @@ -302,25 +302,25 @@ template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } #endif template result_type eval(A & a) { - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template result_type eval(A & a) const { - BOOST_BIND_RETURN l_(type(), f_, a, 0); + return l_(type(), f_, a, 0); } template void accept(V & v) const