|
Boost Users : |
Subject: [Boost-users] [bind][make_shared] compilation failure with ref arg
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-01-25 08:33:18
The last statement below fails to compile with boost 1.39.0 on MSVC 8.
Am I doing anything obviously wrong? Any help is appreciated.
Jeff
#include <boost/bind.hpp>
#include <boost/smart_ptr/make_shared.hpp>
struct X
{
X(const int* ) {}
};
struct Y
{
Y(int& ) {}
};
int _main(int argc, char* argv[])
{
int i = 123;
boost::bind(&boost::make_shared<int>);
boost::bind(&boost::make_shared<int, int>, i);
boost::bind(&boost::make_shared<int, int>, 123);
boost::bind(&boost::make_shared<X, int*>, &i);
boost::bind(&boost::make_shared<Y, int&>, boost::ref(i));
return 0;
}
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net