Dekel Tsur <[EMAIL PROTECTED]> writes: | Use | struct compare_formats { | bool operator()(Format const & a, Format const & b) { | return a.name < b.name; | } | } | | and then | sort(formats_vec.begin(), formats_vec.end(), compare_formats()); | | PS Is there a template for simplfying this ? Yes, less<> (e.g. less(Format>()) Does sort take a function returning bool or one returning int? (-1 less than 0 = equal 1 greater than)? Lgb
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Dekel Tsur
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Jean-Marc Lasgouttes
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Jean-Marc Lasgouttes
- Re: FormPreferences patch Dekel Tsur
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Dekel Tsur
- Re: FormPreferences patch Andre Poenitz
- Re: FormPreferences patch Lars Gullik Bjønnes
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Dekel Tsur
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Jean-Marc Lasgouttes
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Jean-Marc Lasgouttes
- Re: FormPreferences patch Jean-Marc Lasgouttes
- Re: FormPreferences patch Angus Leeming
- Re: FormPreferences patch Jean-Marc Lasgouttes
- Re: FormPreferences patch Angus Leeming