distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
estd Namespace Reference

Collection of useful templates. More...

Namespaces

 internal
 Internals of estd namespace - should not be used directly!
 

Classes

class  ContiguousRange
 ContiguousRange template class is a pair of iterators to contiguous sequence of elements in memory. More...
 
class  IntegerSequence
 Compile-time sequence of integers. More...
 
class  IntrusiveForwardList
 IntrusiveForwardList class is an intrusive linear singly linked list. More...
 
class  IntrusiveForwardListConstIterator
 IntrusiveForwardListConstIterator class is a const iterator of elements on IntrusiveForwardList. More...
 
class  IntrusiveForwardListIterator
 IntrusiveForwardListIterator class is an iterator of elements on IntrusiveForwardList. More...
 
class  IntrusiveForwardListNode
 IntrusiveForwardListNode class is the node that is needed for the object to be linked in IntrusiveForwardList. More...
 
class  IntrusiveList
 IntrusiveList class is an intrusive circular doubly linked list. More...
 
class  IntrusiveListConstIterator
 IntrusiveListConstIterator class is a const iterator of elements on IntrusiveList. More...
 
class  IntrusiveListIterator
 IntrusiveListIterator class is an iterator of elements on IntrusiveList. More...
 
class  IntrusiveListNode
 IntrusiveListNode class is the node that is needed for the object to be linked in IntrusiveList. More...
 
class  ReferenceHolder
 ReferenceHolder template class is a ROMable holder of a reference. More...
 
class  ReverseAdaptor
 ReverseAdaptor template class is an adaptor that "reverses" access to the container. More...
 
class  ScopeGuard
 ScopeGuard template class is a idiom introduced by Andrei Alexandrescu and proposed for C++14 in N3949. More...
 
class  SortedIntrusiveForwardList
 SortedIntrusiveForwardList class is an IntrusiveForwardList with sorted elements. More...
 
class  SortedIntrusiveList
 SortedIntrusiveList class is an IntrusiveList with sorted elements. More...
 
class  TypeErasedFunctor
 
class  TypeErasedFunctor< R(Args...), false >
 TypeErasedFunctor class is an interface for type-erased functors. More...
 
class  TypeErasedFunctor< R(Args...), true >
 TypeErasedFunctor class is an interface for type-erased functors. More...
 

Typedefs

template<std::size_t... Indexes>
using IndexSequence = IntegerSequence< std::size_t, Indexes... >
 Compile-time sequence of std::size_t elements. More...
 
template<typename T , T N>
using MakeIntegerSequence = typename internal::MakeIntegerSequenceImplementationWrapper< T, N >::type::base
 Generator of IntegerSequence types. More...
 
template<std::size_t N>
using MakeIndexSequence = MakeIntegerSequence< std::size_t, N >
 Generator of IndexSequence types. More...
 
template<typename... T>
using IndexSequenceFor = MakeIndexSequence< sizeof...(T)>
 Generator of IndexSequence types. More...
 

Functions

template<typename Function , typename Tuple >
constexpr auto apply (Function &&function, Tuple &&tuple) -> decltype(internal::apply(std::forward< Function >(function), std::forward< Tuple >(tuple), estd::MakeIndexSequence< std::tuple_size< typename std::decay< Tuple >::type >
 Invokes callable object with a tuple of arguments. More...
 
void swap (IntrusiveForwardListNode &left, IntrusiveForwardListNode &right)
 Swaps contents of two nodes. More...
 
template<typename T , IntrusiveForwardListNode T::* NodePointer, typename U = T>
bool operator!= (const IntrusiveForwardListIterator< T, NodePointer, U > &left, const IntrusiveForwardListIterator< T, NodePointer, U > &right)
 IntrusiveForwardListIterator's "not equal to" comparison operator. More...
 
template<typename T , const IntrusiveForwardListNode T::* NodePointer, typename U = T>
bool operator!= (const IntrusiveForwardListConstIterator< T, NodePointer, U > &left, const IntrusiveForwardListConstIterator< T, NodePointer, U > &right)
 IntrusiveForwardListConstIterator's "not equal to" comparison operator. More...
 
template<typename T , IntrusiveForwardListNode T::* NodePointer, const IntrusiveForwardListNode T::* ConstNodePointer, typename U = T>
bool operator== (const IntrusiveForwardListIterator< T, NodePointer, U > &left, const IntrusiveForwardListConstIterator< T, ConstNodePointer, U > &right)
 "Equal to" comparison operator for IntrusiveForwardListIterator and IntrusiveForwardListConstIterator More...
 
template<typename T , IntrusiveForwardListNode T::* NodePointer, const IntrusiveForwardListNode T::* ConstNodePointer, typename U = T>
bool operator!= (const IntrusiveForwardListIterator< T, NodePointer, U > &left, const IntrusiveForwardListConstIterator< T, ConstNodePointer, U > &right)
 "Not equal to" comparison operator for IntrusiveForwardListIterator and IntrusiveForwardListConstIterator More...
 
template<typename T , IntrusiveForwardListNode T::* NodePointer, const IntrusiveForwardListNode T::* ConstNodePointer, typename U = T>
bool operator!= (const IntrusiveForwardListConstIterator< T, ConstNodePointer, U > &left, const IntrusiveForwardListIterator< T, NodePointer, U > &right)
 "Not equal to" comparison operator for IntrusiveForwardListConstIterator and IntrusiveForwardListIterator More...
 
template<typename T , IntrusiveForwardListNode T::* NodePointer, typename U = T>
void swap (IntrusiveForwardList< T, NodePointer, U > &left, IntrusiveForwardList< T, NodePointer, U > &right)
 Swaps contents of two lists. More...
 
template<typename T , IntrusiveListNode T::* NodePointer, typename U = T>
bool operator!= (const IntrusiveListIterator< T, NodePointer, U > &left, const IntrusiveListIterator< T, NodePointer, U > &right)
 IntrusiveListIterator's "not equal to" comparison operator. More...
 
template<typename T , const IntrusiveListNode T::* NodePointer, typename U = T>
bool operator!= (const IntrusiveListConstIterator< T, NodePointer, U > &left, const IntrusiveListConstIterator< T, NodePointer, U > &right)
 IntrusiveListConstIterator's "not equal to" comparison operator. More...
 
template<typename T , IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
bool operator== (const IntrusiveListIterator< T, NodePointer, U > &left, const IntrusiveListConstIterator< T, ConstNodePointer, U > &right)
 "Equal to" comparison operator for IntrusiveListIterator and IntrusiveListConstIterator More...
 
template<typename T , IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
bool operator!= (const IntrusiveListIterator< T, NodePointer, U > &left, const IntrusiveListConstIterator< T, ConstNodePointer, U > &right)
 "Not equal to" comparison operator for IntrusiveListIterator and IntrusiveListConstIterator More...
 
template<typename T , IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
bool operator!= (const IntrusiveListConstIterator< T, ConstNodePointer, U > &left, const IntrusiveListIterator< T, NodePointer, U > &right)
 "Not equal to" comparison operator for IntrusiveListConstIterator and IntrusiveListIterator More...
 
template<typename T , IntrusiveListNode T::* NodePointer, typename U = T>
void swap (IntrusiveList< T, NodePointer, U > &left, IntrusiveList< T, NodePointer, U > &right)
 Swaps contents of two lists. More...
 
template<typename Function , typename... Args>
auto invoke (Function &&function, Args &&... args) -> decltype(internal::invoke(std::forward< Function >(function), std::forward< Args >(args)...))
 Invokes callable object in an appropriate way. More...
 
template<typename T >
ReverseAdaptor< T > makeReverseAdaptor (T &container)
 Helper factory function to make ReverseAdaptor object with deduced template arguments. More...
 
template<typename Function >
ScopeGuard< Function > makeScopeGuard (Function &&function) noexcept
 Helper factory function to make ScopeGuard object with deduced template arguments. More...
 
template<typename Compare , typename T , IntrusiveForwardListNode T::* NodePointer, typename U = T>
void swap (SortedIntrusiveForwardList< Compare, T, NodePointer, U > &left, SortedIntrusiveForwardList< Compare, T, NodePointer, U > &right)
 Swaps contents of two lists. More...
 
template<typename Compare , typename T , IntrusiveListNode T::* NodePointer, typename U = T>
void swap (SortedIntrusiveList< Compare, T, NodePointer, U > &left, SortedIntrusiveList< Compare, T, NodePointer, U > &right)
 Swaps contents of two lists. More...
 

Detailed Description

Collection of useful templates.

Typedef Documentation

◆ IndexSequence

template<std::size_t... Indexes>
using estd::IndexSequence = typedef IntegerSequence<std::size_t, Indexes...>

Compile-time sequence of std::size_t elements.

Similar to std::index_sequence from C++14 - http://en.cppreference.com/w/cpp/utility/integer_sequence

Template Parameters
Indexesis a non-type parameter pack representing the sequence

◆ IndexSequenceFor

template<typename... T>
using estd::IndexSequenceFor = typedef MakeIndexSequence<sizeof...(T)>

Generator of IndexSequence types.

Similar to std::index_sequence_for from C++14 - http://en.cppreference.com/w/cpp/utility/integer_sequence

Generates IndexSequence<0, 1, ..., sizeof...(T) - 1> type.

Template Parameters
Tis the type parameter pack for which an index sequence of the same length will be generated

◆ MakeIndexSequence

template<std::size_t N>
using estd::MakeIndexSequence = typedef MakeIntegerSequence<std::size_t, N>

Generator of IndexSequence types.

Similar to std::make_index_sequence from C++14 - http://en.cppreference.com/w/cpp/utility/integer_sequence

Generates IndexSequence<0, 1, ..., N - 1> type.

Template Parameters
Nis the requested number of elements in the sequence

◆ MakeIntegerSequence

template<typename T , T N>
using estd::MakeIntegerSequence = typedef typename internal::MakeIntegerSequenceImplementationWrapper<T, N>::type::base

Generator of IntegerSequence types.

Similar to std::make_integer_sequence from C++14 - http://en.cppreference.com/w/cpp/utility/integer_sequence

Whole implementation is based on code from http://stackoverflow.com/a/20101039/157344

Generates IntegerSequence<T, 0, 1, ..., N - 1> type.

Template Parameters
Tis an integer type to use for the elements of the sequence
Nis the requested number of elements in the sequence

Function Documentation

◆ apply()

template<typename Function , typename Tuple >
constexpr auto estd::apply ( Function &&  function,
Tuple &&  tuple 
) -> decltype(internal::apply(std::forward<Function>(function), std::forward<Tuple>(tuple), estd::MakeIndexSequence<std::tuple_size<typename std::decay<Tuple>::type>

Invokes callable object with a tuple of arguments.

Implementation inspired by http://en.cppreference.com/w/cpp/experimental/apply

Template Parameters
Functionis the function object that will be invoked
Tupleis the type of tuple of arguments
Parameters
[in]functionis the function object that will be executed
[in]tupleis the tuple of arguments
Returns
value returned by call to function with arguments from tuple
Here is the call graph for this function:

◆ invoke()

template<typename Function , typename... Args>
auto estd::invoke ( Function &&  function,
Args &&...  args 
) -> decltype(internal::invoke(std::forward<Function>(function), std::forward<Args>(args)...))
inline

Invokes callable object in an appropriate way.

Implementation inspired by http://en.cppreference.com/w/cpp/utility/functional/invoke

Template Parameters
Functionis the function object that will be executed
Argsare the arguments for Function
Parameters
[in]functionis the function object that will be executed
[in]argsare arguments for function
Returns
value returned by call to function with args
Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeReverseAdaptor()

template<typename T >
ReverseAdaptor<T> estd::makeReverseAdaptor ( T &  container)

Helper factory function to make ReverseAdaptor object with deduced template arguments.

Template Parameters
Tis the type of container
Parameters
[in]containeris a reference to container
Returns
ReverseAdaptor object
Here is the caller graph for this function:

◆ makeScopeGuard()

template<typename Function >
ScopeGuard<Function> estd::makeScopeGuard ( Function &&  function)
noexcept

Helper factory function to make ScopeGuard object with deduced template arguments.

Template Parameters
Functionis the type of function executed on scope exit
Parameters
[in]functionis a rvalue reference to function executed on scope exit
Returns
ScopeGuard object with deduced template arguments
Here is the caller graph for this function:

◆ operator!=() [1/8]

template<typename T , IntrusiveForwardListNode T::* NodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveForwardListIterator< T, NodePointer, U > &  left,
const IntrusiveForwardListIterator< T, NodePointer, U > &  right 
)
inline

IntrusiveForwardListIterator's "not equal to" comparison operator.

Template Parameters
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a pointer-to-member to IntrusiveForwardListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveForwardListIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveForwardListIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator!=() [2/8]

template<typename T , IntrusiveListNode T::* NodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveListIterator< T, NodePointer, U > &  left,
const IntrusiveListIterator< T, NodePointer, U > &  right 
)
inline

IntrusiveListIterator's "not equal to" comparison operator.

Template Parameters
Tis the type that has the IntrusiveListNode variable
NodePointeris a pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveListIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveListIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator!=() [3/8]

template<typename T , const IntrusiveForwardListNode T::* NodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveForwardListConstIterator< T, NodePointer, U > &  left,
const IntrusiveForwardListConstIterator< T, NodePointer, U > &  right 
)
inline

IntrusiveForwardListConstIterator's "not equal to" comparison operator.

Template Parameters
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a const pointer-to-member to IntrusiveForwardListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveForwardListConstIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveForwardListConstIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator!=() [4/8]

template<typename T , IntrusiveForwardListNode T::* NodePointer, const IntrusiveForwardListNode T::* ConstNodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveForwardListIterator< T, NodePointer, U > &  left,
const IntrusiveForwardListConstIterator< T, ConstNodePointer, U > &  right 
)
inline

"Not equal to" comparison operator for IntrusiveForwardListIterator and IntrusiveForwardListConstIterator

Template Parameters
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a pointer-to-member to IntrusiveForwardListNode variable in T
ConstNodePointeris a const pointer-to-member to IntrusiveForwardListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveForwardListIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveForwardListConstIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator!=() [5/8]

template<typename T , IntrusiveForwardListNode T::* NodePointer, const IntrusiveForwardListNode T::* ConstNodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveForwardListConstIterator< T, ConstNodePointer, U > &  left,
const IntrusiveForwardListIterator< T, NodePointer, U > &  right 
)
inline

"Not equal to" comparison operator for IntrusiveForwardListConstIterator and IntrusiveForwardListIterator

Template Parameters
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a pointer-to-member to IntrusiveForwardListNode variable in T
ConstNodePointeris a const pointer-to-member to IntrusiveForwardListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveForwardListConstIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveForwardListIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator!=() [6/8]

template<typename T , const IntrusiveListNode T::* NodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveListConstIterator< T, NodePointer, U > &  left,
const IntrusiveListConstIterator< T, NodePointer, U > &  right 
)
inline

IntrusiveListConstIterator's "not equal to" comparison operator.

Template Parameters
Tis the type that has the IntrusiveListNode variable
NodePointeris a const pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveListConstIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveListConstIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator!=() [7/8]

template<typename T , IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveListIterator< T, NodePointer, U > &  left,
const IntrusiveListConstIterator< T, ConstNodePointer, U > &  right 
)
inline

"Not equal to" comparison operator for IntrusiveListIterator and IntrusiveListConstIterator

Template Parameters
Tis the type that has the IntrusiveListNode variable
NodePointeris a pointer-to-member to IntrusiveListNode variable in T
ConstNodePointeris a const pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveListIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveListConstIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator!=() [8/8]

template<typename T , IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
bool estd::operator!= ( const IntrusiveListConstIterator< T, ConstNodePointer, U > &  left,
const IntrusiveListIterator< T, NodePointer, U > &  right 
)
inline

"Not equal to" comparison operator for IntrusiveListConstIterator and IntrusiveListIterator

Template Parameters
Tis the type that has the IntrusiveListNode variable
NodePointeris a pointer-to-member to IntrusiveListNode variable in T
ConstNodePointeris a const pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveListConstIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveListIterator on right-hand side of comparison operator
Returns
true if iterators are not equal, false otherwise

◆ operator==() [1/2]

template<typename T , IntrusiveForwardListNode T::* NodePointer, const IntrusiveForwardListNode T::* ConstNodePointer, typename U = T>
bool estd::operator== ( const IntrusiveForwardListIterator< T, NodePointer, U > &  left,
const IntrusiveForwardListConstIterator< T, ConstNodePointer, U > &  right 
)
inline

"Equal to" comparison operator for IntrusiveForwardListIterator and IntrusiveForwardListConstIterator

Template Parameters
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a pointer-to-member to IntrusiveForwardListNode variable in T
ConstNodePointeris a const pointer-to-member to IntrusiveForwardListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveForwardListIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveForwardListConstIterator on right-hand side of comparison operator
Returns
true if both iterators are equal, false otherwise

◆ operator==() [2/2]

template<typename T , IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
bool estd::operator== ( const IntrusiveListIterator< T, NodePointer, U > &  left,
const IntrusiveListConstIterator< T, ConstNodePointer, U > &  right 
)
inline

"Equal to" comparison operator for IntrusiveListIterator and IntrusiveListConstIterator

Template Parameters
Tis the type that has the IntrusiveListNode variable
NodePointeris a pointer-to-member to IntrusiveListNode variable in T
ConstNodePointeris a const pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a const reference to IntrusiveListIterator on left-hand side of comparison operator
[in]rightis a const reference to IntrusiveListConstIterator on right-hand side of comparison operator
Returns
true if both iterators are equal, false otherwise

◆ swap() [1/5]

void estd::swap ( IntrusiveForwardListNode left,
IntrusiveForwardListNode right 
)
inline

Swaps contents of two nodes.

Parameters
[in]leftis a reference to IntrusiveForwardListNode with which contents of right will be swapped
[in]rightis a reference to IntrusiveForwardListNode with which contents of left will be swapped
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap() [2/5]

template<typename Compare , typename T , IntrusiveListNode T::* NodePointer, typename U = T>
void estd::swap ( SortedIntrusiveList< Compare, T, NodePointer, U > &  left,
SortedIntrusiveList< Compare, T, NodePointer, U > &  right 
)
inline

Swaps contents of two lists.

Template Parameters
Compareis a type of functor used for comparison, std::less results in descending order, std::greater - in ascending order
Tis the type that has the IntrusiveListNode variable
NodePointeris a pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a reference to SortedIntrusiveList with which contents of right will be swapped
[in]rightis a reference to SortedIntrusiveList with which contents of left will be swapped
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap() [3/5]

template<typename Compare , typename T , IntrusiveForwardListNode T::* NodePointer, typename U = T>
void estd::swap ( SortedIntrusiveForwardList< Compare, T, NodePointer, U > &  left,
SortedIntrusiveForwardList< Compare, T, NodePointer, U > &  right 
)
inline

Swaps contents of two lists.

Template Parameters
Compareis a type of functor used for comparison, std::less results in descending order, std::greater - in ascending order
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a pointer-to-member to IntrusiveForwardListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a reference to SortedIntrusiveForwardList with which contents of right will be swapped
[in]rightis a reference to SortedIntrusiveForwardList with which contents of left will be swapped
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap() [4/5]

template<typename T , IntrusiveForwardListNode T::* NodePointer, typename U = T>
void estd::swap ( IntrusiveForwardList< T, NodePointer, U > &  left,
IntrusiveForwardList< T, NodePointer, U > &  right 
)
inline

Swaps contents of two lists.

Template Parameters
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a pointer-to-member to IntrusiveForwardListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a reference to IntrusiveForwardList with which contents of right will be swapped
[in]rightis a reference to IntrusiveForwardList with which contents of left will be swapped
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap() [5/5]

template<typename T , IntrusiveListNode T::* NodePointer, typename U = T>
void estd::swap ( IntrusiveList< T, NodePointer, U > &  left,
IntrusiveList< T, NodePointer, U > &  right 
)
inline

Swaps contents of two lists.

Template Parameters
Tis the type that has the IntrusiveListNode variable
NodePointeris a pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;
Parameters
[in]leftis a reference to IntrusiveList with which contents of right will be swapped
[in]rightis a reference to IntrusiveList with which contents of left will be swapped
Here is the call graph for this function:
Here is the caller graph for this function: