If you define some operators for it (< specifically), you should be able to use std::sort without having to do any lambda functions. Though it may be more fun/informative to do it that way (if you do it correctly).
edit: Ah. it looks like SoL mentioned this, but it was deep in his uber-post.