
25 Jan
2010
25 Jan
'10
1:33 p.m.
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; }