lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
Public Member Functions
lean::memory::aligned< Alignment, Heap > Class Template Reference

Aligns derived classes according to the given alignment template argument. More...

#include <aligned.h>

Inheritance diagram for lean::memory::aligned< Alignment, Heap >:
lean::memory::stack_aligned< Alignment >

List of all members.

Public Member Functions

LEAN_INLINE void * operator new (size_t size)
 Allocates an aligned block of memory of the given size.
LEAN_INLINE void operator delete (void *memory)
 Frees the given block of memory.
 LEAN_STATIC_ASSERT_MSG_ALT (Alignment &~Alignment,"Alignment is required to be power of two.", Alignment_is_required_to_be_power_of_two)

Detailed Description

template<size_t Alignment, class Heap = default_heap>
class lean::memory::aligned< Alignment, Heap >

Aligns derived classes according to the given alignment template argument.

Remarks:
MSC adds padding to make the size of aligned structures a multiple of their alignment, make sure to specify this base class first to allow for empty base class optimization.
See also:
lean::memory::heap_bound

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