Actions
Support #1140
closedAnyone knot how to do sth like that: std::sort(dbo::ptr<User> vecUsers.begin(), dbo::ptr<User> vecUsers.end(), sortByname);
Start date:
01/19/2012
Due date:
% Done:
0%
Estimated time:
Description
Hi
This is the method to sorting vector but it's not compiling when I have vector dbo::ptr.
For example function :
void sortByname(dbo::ptr first, dbo::ptr second)
{
return (first~~name < second~~>name);
}
Anyone know how to sort vector of dbo::ptr ?
Thanks
Kris
Updated by Koen Deforche almost 13 years ago
- Status changed from New to Feedback
Hey,
I can't thinking of a special complication, and your comparison function seems fine. What is the exact error you get? Could you reproduce it in a small test case?
Regards,
koen
Updated by Kris Duraj almost 13 years ago
Hey,
It was my stupid false, I didn't add "static" to my class function sortByName. Now everything works fine.
Thanks for your answer.
Kris
Updated by Koen Deforche almost 13 years ago
- Status changed from Feedback to Resolved
Great. Problem solved !
Updated by Koen Deforche over 12 years ago
- Status changed from Resolved to Closed
- Target version set to 3.2.1
Actions