CGAL 5.1 - Number Types
CGAL::Max< T, Less > Struct Template Reference

#include <CGAL/utils_classes.h>

Definition

template<typename T, typename Less>
struct CGAL::Max< T, Less >

The function object class Max returns the larger of two values. The order is induced by the second template argument Less. The default value for Less is std::less.

Note that T must be a model of LessThanComparable in case std::less is used.

Is Model Of:
AdaptableFunctor

Creation

 Max ()
 default constructor. More...
 
 Max (Less c)
 The constructed object will use c to compare the arguments. More...
 

Operations

operator() (const T &x, const T &y)
 returns the larger of x and y, with respect to the order induced by Less. More...
 

Constructor & Destructor Documentation

◆ Max() [1/2]

template<typename T , typename Less >
CGAL::Max< T, Less >::Max ( )

default constructor.

◆ Max() [2/2]

template<typename T , typename Less >
CGAL::Max< T, Less >::Max ( Less  c)

The constructed object will use c to compare the arguments.

Member Function Documentation

◆ operator()()

template<typename T , typename Less >
T CGAL::Max< T, Less >::operator() ( const T &  x,
const T &  y 
)

returns the larger of x and y, with respect to the order induced by Less.