CoreComponents 3.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
FindAny Class Reference

Find a matching item. More...

#include <cc/find>

Static Public Member Functions

template<class Order = DefaultOrder, class Container , class Pattern = typename Container::Item, class Index = long>
static bool find (const Container *items, const Pattern &pattern, Index *finalIndex)
 Search in a sorted list of items.
 
template<class Order = DefaultOrder, class Container , class Pattern = typename Container::Item, class Index = long>
static bool find (Container *items, const Pattern &pattern, Index *finalIndex=nullptr, typename Container::Item **finalItem=nullptr)
 

Detailed Description

Find a matching item.

Member Function Documentation

◆ find()

template<class Order = DefaultOrder, class Container , class Pattern = typename Container::Item, class Index = long>
static bool find ( const Container * items,
const Pattern & pattern,
Index * finalIndex )
static

Search in a sorted list of items.

Template Parameters
OrderSorting order
ContainerContainer type
PatternPattern type
IndexIndex type
Parameters
itemsThe sorted list of items
patternPattern to search for
finalIndexReturns the final index of the search
Returns
True if a matching item was found, false otherwise