This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/35569] [c++0x] std::bind result functor doesn't accept rvalues
- From: "jeff at schwabcenter dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jan 2009 19:20:11 -0000
- Subject: [Bug libstdc++/35569] [c++0x] std::bind result functor doesn't accept rvalues
- References: <bug-35569-6196@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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