cds  2.3.2
cds::details::type_padding< T, AlignFactor > Class Template Reference

Automatic alignment type T to AlignFactor. More...

#include <cds/details/type_padding.h>

Public Types

enum  
 Align factor.
 
enum  { value = type::value }
 Padding constant.
 
typedef type_padding_helper< T, align_factor, sizeof(T) % align_factor > type
 Result type.
 

Detailed Description

template<typename T, int AlignFactor>
class cds::details::type_padding< T, AlignFactor >

Automatic alignment type T to AlignFactor.

The class adds appropriate bytes to type T that the following condition is true:

sizeof( type_padding<T,AlignFactor>::type ) % AlignFactor == 0

It is guaranteed that count of padding bytes no more than AlignFactor - 1.

Applicability: type T must not have constructors another that default ctor. For example, T may be any POD type.


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

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:35 by Doxygen 1.8.13