Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | > | struct CompareKey { | > | bool operator()(XPMmap const & lhs, XPMmap const & rhs) { | > | return strcmp(lhs.key, rhs.key) < 0; | > | } | > | > | bool operator()(XPMmap const & lhs, string const & rhs) { | > | return strcmp(lhs.key, rhs.c_str()) < 0; | > | } | > | > We have a compare function in lyx::support for this. lstrings.h | | ??? For comparison bewteen XPMmap::key and a string? How?
No, you misunderstand, for comparing a char * and a string. so...: return compare(lhs.key, rhs.key) < 0; and return compare(lhs.key, rhs) < 0; -- Lgb