Boost logo

Boost :

Subject: [boost] boost::bind C2664 error with two non-const references
From: Nicolas FRANCOIS (nicolas.francois_at_[hidden])
Date: 2015-05-20 08:59:23


Hi,
Relatively to this thread http://lists.boost.org/Archives/boost/2015/03/220930.php and this correcting commit 42b5cef177603328ead66bc6a98a3067aebc433d, I still have errors using boost::bind.

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

struct A {
  void f(int&, std::vector<int*>&);
};

int main(){
  A a;
  auto f = boost::bind(&A:f, &a, _1, _2);
}

results in error C2664: cannot convert from 'const std::vector<int*> &' to 'std::vector<int*> &'
Defining BOOST_NO_CXX11_RVALUE_REFERENCES solves the issue for now.

Nicolas FRANCOIS
Software Department

L-ACOUSTICS
Tel : +33 (0) 1 69 63 23 90
Fax : +33 (0) 1 69 63 69 64
www.l-acoustics.com<http://www.l-acoustics.com/>

Please consider the environment before printing this email.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk