| Technical Specification | ||||
| Filesystem library(filesystem TS) | ||||
| Library fundamentals(library fundamentals TS) | ||||
| Library fundamentals 2(library fundamentals TS v2) | ||||
| Library fundamentals 3(library fundamentals TS v3) | ||||
| Extensions for parallelism(parallelism TS) | ||||
| Extensions for parallelism 2(parallelism TS v2) | ||||
| Extensions for concurrency(concurrency TS) | ||||
| Extensions for concurrency 2(concurrency TS v2) | ||||
| Concepts(concepts TS) | ||||
| Ranges(ranges TS) | ||||
| Reflection(reflection TS) | ||||
| Mathematical special functions(special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
| Utility components | |||||||||||||
| Function objects | |||||||||||||
| |||||||||||||
| Metaprogramming and type traits | |||||||||||||
| Tagged pairs and tuples | |||||||||||||
Defined in header <experimental/ranges/functional> | ||
template<class T=void> requires StrictTotallyOrdered<T>|| | (ranges TS) | |
template<> struct less<void>; | (ranges TS) | |
Function object for performing comparisons. The primary template invokesoperator< on const lvalues of typeT. The specializationless<void> deduces the parameter types of the function call operator from the arguments (but not the return type).
All specializations ofless areSemiregular.
Contents |
| Member type | Definition |
is_transparent(member only ofless<void> specialization) | /* unspecified */ |
operator() | checks if the first argument isless than the second (public member function) |
constexprbool operator()(const T& x,const T& y)const; | (1) | (member only of primaryless<T> template) |
template<class T,class U> requires StrictTotallyOrderedWith<T, U>|| | (2) | (member only ofless<void> specialization) |
t andu. Equivalent toreturnstd::forward<T>(t)<std::forward<U>(u);, except when that expression resolves to a call to a builtinoperator< comparing pointers.When a call to(1) or(2) would invoke a built-in operator comparing pointers of typeP, the result is instead determined as follows:
P. This strict total ordering is consistent with the partial order imposed by the builtin operators<,>,<=, and>=.The behavior is undefined unless the conversion sequences from bothT andU toP are equality-preserving (see below).
An expression isequality preserving if it results in equal outputs given equal inputs.
Every expression required to be equality preserving is further required to bestable: two evaluations of such an expression with the same input objects must have equal outputs absent any explicit intervening modification of those input objects.
Unlikestd::less,ranges::less requires all six comparison operators<,<=,>,>=,== and!= to be valid (via theStrictTotallyOrdered andStrictTotallyOrderedWith constraints).
| This section is incomplete Reason: no example |
| function object implementingx< y (class template)[edit] |