Lines Matching defs:Alignment
1 //===--- AlignOf.h - Portable calculation of type alignment -----*- C++ -*-===//
31 /// the alignment of the template argument. For example,
32 /// AlignOf<int>::Alignment represents the alignment of type "int". The
33 /// alignment calculated is the minimum alignment, and not necessarily
34 /// the "desired" alignment returned by GCC's __alignof__ (for example). Note
35 /// that because the alignment is an enum value, it can be used as a
39 enum { Alignment =
42 enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 };
43 enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };
44 enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 };
45 enum { Alignment_GreaterEqual_16Bytes = Alignment >= 16 ? 1 : 0 };
47 enum { Alignment_LessEqual_2Bytes = Alignment <= 2 ? 1 : 0 };
48 enum { Alignment_LessEqual_4Bytes = Alignment <= 4 ? 1 : 0 };
49 enum { Alignment_LessEqual_8Bytes = Alignment <= 8 ? 1 : 0 };
50 enum { Alignment_LessEqual_16Bytes = Alignment <= 16 ? 1 : 0 };
53 /// alignOf - A templated function that returns the minimum alignment of
56 /// alignOf<int>() returns the alignment of an int.
58 inline unsigned alignOf() { return AlignOf<T>::Alignment; }
66 /// integer literal can be used to specify an alignment constraint. Once built
74 template<std::size_t Alignment, std::size_t Size>
76 alignas(Alignment) char buffer[Size];
81 template<std::size_t Alignment, std::size_t Size>
108 template<std::size_t Alignment, std::size_t Size>
113 // a member of a by-value function argument in MSVC, even if the alignment
115 // even include the declspec with the union that forces the alignment because
117 // proper alignment.
205 T6, T7, T8, T9, T10> >::Alignment,