Ticket #5141: boost_bind_bind_hpp.patch

File boost_bind_bind_hpp.patch, 8.7 KB (added by Joachim Faulhaber, 12 years ago)

Patch of bost/bind/bind.hpp replacing template class value by _value

  • bind.hpp

     
    109109
    110110// value
    111111
    112 template<class T> class value
     112template<class T> class _value
    113113{
    114114public:
    115115
    116     value(T const & t): t_(t) {}
     116    _value(T const & t): t_(t) {}
    117117
    118118    T & get() { return t_; }
    119119    T const & get() const { return t_; }
    120120
    121     bool operator==(value const & rhs) const
     121    bool operator==(_value const & rhs) const
    122122    {
    123123        return t_ == rhs.t_;
    124124    }
     
    130130
    131131// ref_compare for weak_ptr
    132132
    133 template<class T> bool ref_compare( value< weak_ptr<T> > const & a, value< weak_ptr<T> > const & b, int )
     133template<class T> bool ref_compare( _value< weak_ptr<T> > const & a, _value< weak_ptr<T> > const & b, int )
    134134{
    135135    return !(a.get() < b.get()) && !(b.get() < a.get());
    136136}
     
    167167
    168168    list0() {}
    169169
    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(); }
    171171
    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(); }
    173173
    174174    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    175175
     
    228228
    229229    A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; }
    230230
    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(); }
    232232
    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(); }
    234234
    235235    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    236236
     
    288288    A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; }
    289289    A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; }
    290290
    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(); }
    292292
    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(); }
    294294
    295295    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    296296
     
    367367    A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; }
    368368    A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; }
    369369
    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(); }
    371371
    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(); }
    373373
    374374    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    375375
     
    432432    A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; }
    433433    A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; }
    434434
    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(); }
    436436
    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(); }
    438438
    439439    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    440440
     
    500500    A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; }
    501501    A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; }
    502502
    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(); }
    504504
    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(); }
    506506
    507507    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    508508
     
    571571    A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; }
    572572    A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; }
    573573
    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(); }
    575575
    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(); }
    577577
    578578    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    579579
     
    645645    A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; }
    646646    A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; }
    647647
    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(); }
    649649
    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(); }
    651651
    652652    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    653653
     
    722722    A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; }
    723723    A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; }
    724724
    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(); }
    726726
    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(); }
    728728
    729729    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    730730
     
    802802    A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; }
    803803    A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; }
    804804
    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(); }
    806806
    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(); }
    808808
    809809    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
    810810
     
    986986
    987987template<class T> struct add_value
    988988{
    989     typedef _bi::value<T> type;
     989    typedef _bi::_value<T> type;
    990990};
    991991
    992992#else
     
    998998
    999999template< class T > struct add_value_2< T, 0 >
    10001000{
    1001     typedef _bi::value< T > type;
     1001    typedef _bi::_value< T > type;
    10021002};
    10031003
    10041004template<class T> struct add_value
     
    10081008
    10091009#endif
    10101010
    1011 template<class T> struct add_value< value<T> >
     1011template<class T> struct add_value< _value<T> >
    10121012{
    1013     typedef _bi::value<T> type;
     1013    typedef _bi::_value<T> type;
    10141014};
    10151015
    10161016template<class T> struct add_value< reference_wrapper<T> >
     
    10491049{
    10501050    template<class T> struct inner
    10511051    {
    1052         typedef value<T> type;
     1052        typedef _value<T> type;
    10531053    };
    10541054};
    10551055
    10561056typedef char (&_avt_r1) [1];
    10571057typedef char (&_avt_r2) [2];
    10581058
    1059 template<class T> _avt_r1 _avt_f(value<T>);
     1059template<class T> _avt_r1 _avt_f(_value<T>);
    10601060template<class T> _avt_r1 _avt_f(reference_wrapper<T>);
    10611061template<int I> _avt_r1 _avt_f(arg<I>);
    10621062template<int I> _avt_r1 _avt_f(arg<I> (*) ());
     
    12371237#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \
    12381238   && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
    12391239
    1240 template<class V, class T> void visit_each( V & v, value<T> const & t, int )
     1240template<class V, class T> void visit_each( V & v, _value<T> const & t, int )
    12411241{
    12421242    using boost::visit_each;
    12431243    BOOST_BIND_VISIT_EACH( v, t.get(), 0 );
     
    12571257#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \
    12581258  || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
    12591259
    1260 template<class V, class T> void visit_each( V & v, _bi::value<T> const & t, int )
     1260template<class V, class T> void visit_each( V & v, _bi::_value<T> const & t, int )
    12611261{
    12621262    BOOST_BIND_VISIT_EACH( v, t.get(), 0 );
    12631263}