SGI

less<T>

Category: functors Component type: type

Description

Less<T> is a function object. Specifically, it is an Adaptable Binary Predicate, which means it is a function object that tests the truth or falsehood of some condition. If f is an object of class less<T> and x and y are objects of class T, then f(x,y) returns true if x < y and false otherwise.

Example

Finds the first negative element in a list.
list<int> L;
...
list<int>::iterator first_negative = 
       find_if(L.begin(), L.end(), bind2nd(less<int>(), 0));
assert(first_negative == L.end() || *first_negative < 0);

Definition

Defined in the standard header functional, and in the nonstandard backward-compatibility header function.h.

Template parameters

Parameter Description Default
T The type of an./usr/share/doc/stl-manual/html/iterators.gif0100644000000000000000000000720507120014753020121 0ustar rootrootGIF87a&>=PPFF..--  &&$&bb^^" UM$ CC@@xCC;; eecc_[NNFFyy)) HGrrppDDDDVVYY``]]NNOO0000ffYY PPNN55==xxkkQQKK && XM C <xllhhDD@@~~CCvvwwuuXPA22//yyZZWWrrjj;;33MM==[[SS [Yjinn ""77%%<<99LL67((##((7.//""@CVV 44X((Zdd@@mm44j&&goo7722y{;;{{+ 55JJqqTTKK!!,,99,&G H*\P &"h֌_E~picX vV&MZb9sx\r, ? CtгG(4L0aDEU U`Wې9 8:7۲p>q6m&0bĕǑ"MZ19)esXάI3'"8{fP`C>ӦPRkVwzCװcӃ{N>| ؞6 %a[a`Kn8D X(PpD֘X뺶ffX5MѓGKMQ-:o]v;U72"RB05=S,YhTUXiW]Zkb&∳5u7t#r> d0s 6;zjso(zόOҢ($IY-L58pZ QHugO5efؕjw"|IV\DUD^W,2=$sa,dK/%c8ēOPFig=T]cUYjy筸讼ED^-R&IJN)L$Nk6TgjUg[\ܘ (QavZI&2l1zH'Ьfnʳ qKZ)+%S ?jQ2;5 v[֭x^/\vJ[i