JUCE  v5.1.1-3-g1a0b28c73
JUCE API
DefaultElementComparator< ElementType > Class Template Reference

A simple ElementComparator class that can be used to sort an array of objects that support the '<' operator. More...

#include <juce_ElementComparator.h>

Static Public Member Functions

static int compareElements (ParameterType first, ParameterType second)
 

Private Types

typedef TypeHelpers::ParameterType< ElementType >::type ParameterType
 

Detailed Description

template<class ElementType>
class DefaultElementComparator< ElementType >

A simple ElementComparator class that can be used to sort an array of objects that support the '<' operator.

This will work for primitive types and objects that implement operator<().

Example:

Array <int> myArray;
myArray.sort (sorter);
See also
ElementComparator

Member Typedef Documentation

◆ ParameterType

template<class ElementType>
typedef TypeHelpers::ParameterType<ElementType>::type DefaultElementComparator< ElementType >::ParameterType
private

Member Function Documentation

◆ compareElements()

template<class ElementType>
static int DefaultElementComparator< ElementType >::compareElements ( ParameterType  first,
ParameterType  second 
)
inlinestatic

The documentation for this class was generated from the following file: