EnTT 4.0.0
Loading...
Searching...
No Matches
entt::insertion_sort Struct Reference

Function object for performing insertion sort. More...

#include <algorithm.hpp>

Public Member Functions

template<typename Compare = stl::less<>>
void operator() (stl::random_access_iterator auto first, stl::random_access_iterator auto last, Compare compare=Compare{}) const
 Sorts the elements in a range.

Detailed Description

Function object for performing insertion sort.

Definition at line 42 of file algorithm.hpp.

Member Function Documentation

◆ operator()()

template<typename Compare = stl::less<>>
void entt::insertion_sort::operator() ( stl::random_access_iterator auto first,
stl::random_access_iterator auto last,
Compare compare = Compare{} ) const
inline

Sorts the elements in a range.

Sorts the elements in a range using the given binary comparison function.

Template Parameters
CompareType of comparison function object.
Parameters
firstAn iterator to the first element of the range to sort.
lastAn iterator past the last element of the range to sort.
compareA valid comparison function object.

Definition at line 54 of file algorithm.hpp.


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