Binary function object class whose call returns whether the its first argument compares less than the second (as returned by operator < ).
Search:
Reference
less
classtemplate
std::less
templatestructless;Functionobjectclassforless-thaninequalitycomparison
Binaryfunctionobjectclasswhosecallreturnswhethertheitsfirstargumentcompareslessthanthesecond(asreturnedbyoperatorstructless:binary_function{
booloperator()(constT&x,constT&y)const{returnxstructless{
booloperator()(constT&x,constT&y)const{returnx//std::cout
#include//std::less
#include//std::sort,std::includes
intmain(){
intfoo[]={10,20,5,15,25};
intbar[]={15,10,20};
std::sort(foo,foo+5,std::less());//510152025
std::sort(bar,bar+3,std::less());//101520
if(std::includes(foo,foo+5,bar,bar+3,std::less()))
std::cout<(assert.h)
(ctype.h)
(errno.h)
(fenv.h)
(float.h)
(inttypes.h)
(iso646.h)
(limits.h)
(locale.h)
(math.h)
(setjmp.h)
(signal.h)
(stdarg.h)
(stdbool.h)
(stddef.h)
(stdint.h)
(stdio.h)
(stdlib.h)
(string.h)
(tgmath.h)
(time.h)
(uchar.h)
(wchar.h)
(wctype.h)
Containers: