Ticket #5141: boost_bind_bind_hpp.patch
File boost_bind_bind_hpp.patch, 8.7 KB (added by , 12 years ago) |
---|
-
bind.hpp
109 109 110 110 // value 111 111 112 template<class T> class value112 template<class T> class _value 113 113 { 114 114 public: 115 115 116 value(T const & t): t_(t) {}116 _value(T const & t): t_(t) {} 117 117 118 118 T & get() { return t_; } 119 119 T const & get() const { return t_; } 120 120 121 bool operator==( value const & rhs) const121 bool operator==(_value const & rhs) const 122 122 { 123 123 return t_ == rhs.t_; 124 124 } … … 130 130 131 131 // ref_compare for weak_ptr 132 132 133 template<class T> bool ref_compare( value< weak_ptr<T> > const & a,value< weak_ptr<T> > const & b, int )133 template<class T> bool ref_compare( _value< weak_ptr<T> > const & a, _value< weak_ptr<T> > const & b, int ) 134 134 { 135 135 return !(a.get() < b.get()) && !(b.get() < a.get()); 136 136 } … … 167 167 168 168 list0() {} 169 169 170 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }170 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 171 171 172 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }172 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 173 173 174 174 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 175 175 … … 228 228 229 229 A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 230 230 231 template<class T> T & operator[] ( _bi:: value<T> & v ) const { return v.get(); }231 template<class T> T & operator[] ( _bi::_value<T> & v ) const { return v.get(); } 232 232 233 template<class T> T const & operator[] ( _bi:: value<T> const & v ) const { return v.get(); }233 template<class T> T const & operator[] ( _bi::_value<T> const & v ) const { return v.get(); } 234 234 235 235 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 236 236 … … 288 288 A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } 289 289 A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 290 290 291 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }291 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 292 292 293 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }293 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 294 294 295 295 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 296 296 … … 367 367 A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } 368 368 A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 369 369 370 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }370 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 371 371 372 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }372 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 373 373 374 374 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 375 375 … … 432 432 A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } 433 433 A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 434 434 435 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }435 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 436 436 437 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }437 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 438 438 439 439 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 440 440 … … 500 500 A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } 501 501 A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } 502 502 503 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }503 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 504 504 505 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }505 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 506 506 507 507 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 508 508 … … 571 571 A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } 572 572 A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } 573 573 574 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }574 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 575 575 576 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }576 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 577 577 578 578 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 579 579 … … 645 645 A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } 646 646 A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } 647 647 648 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }648 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 649 649 650 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }650 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 651 651 652 652 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 653 653 … … 722 722 A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } 723 723 A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } 724 724 725 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }725 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 726 726 727 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }727 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 728 728 729 729 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 730 730 … … 802 802 A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } 803 803 A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } 804 804 805 template<class T> T & operator[] (_bi:: value<T> & v) const { return v.get(); }805 template<class T> T & operator[] (_bi::_value<T> & v) const { return v.get(); } 806 806 807 template<class T> T const & operator[] (_bi:: value<T> const & v) const { return v.get(); }807 template<class T> T const & operator[] (_bi::_value<T> const & v) const { return v.get(); } 808 808 809 809 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); } 810 810 … … 986 986 987 987 template<class T> struct add_value 988 988 { 989 typedef _bi:: value<T> type;989 typedef _bi::_value<T> type; 990 990 }; 991 991 992 992 #else … … 998 998 999 999 template< class T > struct add_value_2< T, 0 > 1000 1000 { 1001 typedef _bi:: value< T > type;1001 typedef _bi::_value< T > type; 1002 1002 }; 1003 1003 1004 1004 template<class T> struct add_value … … 1008 1008 1009 1009 #endif 1010 1010 1011 template<class T> struct add_value< value<T> >1011 template<class T> struct add_value< _value<T> > 1012 1012 { 1013 typedef _bi:: value<T> type;1013 typedef _bi::_value<T> type; 1014 1014 }; 1015 1015 1016 1016 template<class T> struct add_value< reference_wrapper<T> > … … 1049 1049 { 1050 1050 template<class T> struct inner 1051 1051 { 1052 typedef value<T> type;1052 typedef _value<T> type; 1053 1053 }; 1054 1054 }; 1055 1055 1056 1056 typedef char (&_avt_r1) [1]; 1057 1057 typedef char (&_avt_r2) [2]; 1058 1058 1059 template<class T> _avt_r1 _avt_f( value<T>);1059 template<class T> _avt_r1 _avt_f(_value<T>); 1060 1060 template<class T> _avt_r1 _avt_f(reference_wrapper<T>); 1061 1061 template<int I> _avt_r1 _avt_f(arg<I>); 1062 1062 template<int I> _avt_r1 _avt_f(arg<I> (*) ()); … … 1237 1237 #if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \ 1238 1238 && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) 1239 1239 1240 template<class V, class T> void visit_each( V & v, value<T> const & t, int )1240 template<class V, class T> void visit_each( V & v, _value<T> const & t, int ) 1241 1241 { 1242 1242 using boost::visit_each; 1243 1243 BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); … … 1257 1257 #if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \ 1258 1258 || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) 1259 1259 1260 template<class V, class T> void visit_each( V & v, _bi:: value<T> const & t, int )1260 template<class V, class T> void visit_each( V & v, _bi::_value<T> const & t, int ) 1261 1261 { 1262 1262 BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); 1263 1263 }