> bool operator()( const string& x, const string& y) const > { > return your ordering; > }
Where your ordering can be written as std::lexicographical_compare ( x.begin() , x.end() , y.begin() , y.end() , ICAOcode_char_lt() ) where ICAOcode_char_lt implements the ``less than'' relation for the individual characters for your ICAO codes: struct ICAOcode_char_lt { bool operator()( char const x , char const y ) const { // Numbers come after letters: if( std::isalpha( x ) && std::isdigit( y ) ) { return true ; } // Upper-case only comparison: return std::toupper( x ) < std::toupper( y ) ; } } ; (hope this relation is transitive---please check!) Cheers -Gerhard -- Gerhard Wesp o o Tel.: +41 (0) 43 5347636 Bachtobelstrasse 56 | http://www.cosy.sbg.ac.at/~gwesp/ CH-8045 Zuerich \_/ See homepage for email address! _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d