KiCad PCB EDA Suite
kicad_algo.h File Reference
#include <algorithm>
#include <functional>
#include <utility>
#include <wx/debug.h>

Go to the source code of this file.




template<typename _Type , typename _Function >
void alg::run_on_pair (std::pair< _Type, _Type > &__pair, _Function __f)
 Apply a function to the first and second element of a std::pair. More...
template<typename _InputIterator , typename _Function >
void alg::adjacent_pairs (_InputIterator __first, _InputIterator __last, _Function __f)
 Apply a function to every sequential pair of elements of a sequence. More...
template<typename _InputIterator , typename _Function >
void alg::for_all_pairs (_InputIterator __first, _InputIterator __last, _Function __f)
 Apply a function to every possible pair of elements of a sequence. More...
template<class _Container , typename _Value >
bool alg::contains (const _Container &__container, _Value __value)
 Returns true if the container contains the given value. More...
template<typename _Type , typename _Value >
bool alg::pair_contains (const std::pair< _Type, _Type > __pair, _Value __value)
 Returns true if either of the elements in an std::pair contains the given value. More...
template<class T >
bool alg::within_wrapped_range (T __val, T __minval, T __maxval, T __wrap)
 Test if __val lies within __minval and __maxval in a wrapped range. More...
template<class _Container , typename _Value >
void alg::delete_matching (_Container &__c, _Value __value)
 Covers for the horrifically named std::remove and std::remove_if (neither of which remove anything). More...
template<class _Container , class _Function >
void alg::delete_if (_Container &__c, _Function &&__f)
 Deletes all values from __c for which __f returns true. More...