Re: [Boost-users] [boost-users] crash of visual studio compiler with boost bind
Shouldn't that _2 be _1? Otherwise, isn't the third argument to the outer bind a binary functor? If so, could that syntax error be the cause of the crash? At 03:59 AM 8/7/2008, you wrote:
Hello, the following code makes the VC++ compiler (VS 2005) crash, but only when I am trying a release build ! The debug builds work fine.
std::sort(l_vec.begin(),l_vec.end(),boost::bind(std::less<int>(),boost::bind(&CLayer::GetPrio,_1),boost::bind(&CLayer::GetPrio,_2)));
Hello,
The the order of arguments _1 _2 shouldnt matter as far as the compiler
crash
is concerned, since both objects are of the same type. There is an example
in the boost-bind tutorial that uses std::sort with bind just like this.
And as I said, it DOES work when I turn "use unicode response file" off.
best regards, Oliver
2008/8/7 Alan M. Carroll
Shouldn't that _2 be _1? Otherwise, isn't the third argument to the outer bind a binary functor? If so, could that syntax error be the cause of the crash?
At 03:59 AM 8/7/2008, you wrote:
Hello, the following code makes the VC++ compiler (VS 2005) crash, but only when I am trying a release build ! The debug builds work fine.
std::sort(l_vec.begin(),l_vec.end(),boost::bind(std::less<int>(),boost::bind(&CLayer::GetPrio,_1),boost::bind(&CLayer::GetPrio,_2)));
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Alan M. Carroll
-
Oliver Kania