Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Namespaces | Functions
basic_algos.hpp File Reference
#include <mutex>
#include <type_traits>
#include <jau/cow_iterator.hpp>
Include dependency graph for basic_algos.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  jau::call_on_release< UnaryFunction >
 Call on release allows the user to pass a function to be called at destruction of this instance. More...
 

Namespaces

namespace  jau
 __pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
 

Functions

template<class InputArray , class T >
constexpr bool jau::contains (InputArray &array, const T &value)
 Return true if value is contained in array. More...
 
template<class InputIt , class T >
constexpr InputIt jau::find (InputIt first, InputIt last, const T &value)
 Like std::find() of 'algorithm'. More...
 
template<class T >
const T::value_type * jau::find_const (T &data, typename T::value_type const &elem, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept
 
template<class T >
const T::value_type * jau::find_const (T &data, typename T::value_type const &elem, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept
 
template<class InputIt , class UnaryPredicate >
constexpr InputIt jau::find_if (InputIt first, InputIt last, UnaryPredicate p)
 Like std::find_if() of 'algorithm'. More...
 
template<class InputIt , class UnaryPredicate >
constexpr InputIt jau::find_if_not (InputIt first, InputIt last, UnaryPredicate q)
 Like std::find_if_not() of 'algorithm'. More...
 
template<class InputIt , class UnaryFunction >
constexpr UnaryFunction jau::for_each (InputIt first, InputIt last, UnaryFunction f)
 Like std::for_each() of 'algorithm'. More...
 
template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_const (T &data, UnaryFunction f, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept
 
template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_const (T &data, UnaryFunction f, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept
 
template<class InputIt , class UnaryFunction >
constexpr UnaryFunction jau::for_each_fidelity (InputIt first, InputIt last, UnaryFunction f)
 Like jau::for_each(), see above. More...
 
template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_fidelity (T &data, UnaryFunction f, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept
 See jau::for_each_fidelity() More...
 
template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_fidelity (T &data, UnaryFunction f, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept
 See jau::for_each_fidelity() More...
 
template<class InputArray , class UnaryFunction >
constexpr UnaryFunction jau::for_each_idx (InputArray &array, UnaryFunction f)
 Custom for_each template, using indices instead of iterators, allowing container to be modified within lambda 'callback'. More...
 
template<class Mutex , class InputArray , class UnaryFunction >
constexpr UnaryFunction jau::for_each_idx_mtx (Mutex &mtx, InputArray &array, UnaryFunction f)
 Custom for_each template, same as jau::for_each but using indices instead of iterators and a mutex. More...
 
template<class Mutex , class InputIt , class UnaryFunction >
constexpr UnaryFunction jau::for_each_mtx (Mutex &mtx, InputIt first, InputIt last, UnaryFunction f)
 Custom for_each template, same as jau::for_each but using a mutex. More...
 
template<class ForwardIt , class UnaryPredicate >
ForwardIt jau::remove_if (ForwardIt first, ForwardIt last, UnaryPredicate p)
 Identical to C++20 std::remove_if() of algorithm More...