What is this header for?
It defines, just to give an example, equal_to
:
namespace ranges
{
/// \addtogroup group-functional
/// @{
struct equal_to
{
template(typename T, typename U)(
/// \pre
requires equality_comparable_with<T, U>)
constexpr bool operator()(T && t, U && u) const
{
return (T &&) t == (U &&) u;
}
using is_transparent = void;
};
// ... and the others, such as !=, <, <=, ...
}
But what is the advantage of ranges::equal_to
over std::equal_to
? Only saving <>
when instantiating an object of it's class, i.e. writing ranges::equal_to{}
instead of std::equal_to<>{}
?