Nugget
Static Public Member Functions | List of all members
eastl::fixed_swap_impl< Container, UseHeapTemporary > Class Template Reference

#include <fixed_pool.h>

Static Public Member Functions

static void swap (Container &a, Container &b)
 

Detailed Description

template<typename Container, bool UseHeapTemporary>
class eastl::fixed_swap_impl< Container, UseHeapTemporary >

fixed_swap

This function implements a swap suitable for fixed containers. This is an issue because the size of fixed containers can be very large, due to their having the container buffer within themselves. Note that we are referring to sizeof(container) and not the total sum of memory allocated by the container from the heap.

This implementation switches at compile time whether or not the temporary is allocated on the stack or the heap as some compilers will allocate the (large) stack frame regardless of which code path is picked.


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