Boost logo

Boost Users :

From: gast128 (gast128_at_[hidden])
Date: 2008-08-08 17:13:05


Oliver Kania <kania.oliver <at> googlemail.com> writes:

>
> 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)));    Where
CLayer::GetPrio returns an integer.Best regards,Oliver

It is not an answer to your question, but may be a workaround: Boost.Bind now
supports direct <, so one could write:

std::sort(l_vec.begin(),
          l_vec.end(),
          boost::bind(&CLayer::GetPrio,_1) < boost::bind(&CLayer::GetPrio,_2));

Which is also more readable.


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