This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/35569] [c++0x] std::bind result functor doesn't accept rvalues



------- Comment #2 from jeff at schwabcenter dot com  2009-01-14 19:20 -------
I'm seeing the same thing with Boost.Bind (boost 1.37, GCC 4.2.1).

#include <boost/bind.hpp>
#include <functional>

using boost::bind;
using std::multiplies;

int main() {

    // Fine.
    int const lvalue = 5;
    bind(multiplies<int>(),4,_1)(lvalue);

    // Mistaken for a cast.
    bind(multiplies<int>(),4,_1)(5);
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35569


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]