Home | History | Annotate | Download | only in Support

Lines Matching refs:Alignment

1 //===--- AlignOf.h - Portable calculation of type alignment -----*- C++ -*-===//
27 // generated by any class using AlignOf<T> with a manually specified alignment.
39 /// the alignment of the template argument. For example,
40 /// AlignOf<int>::Alignment represents the alignment of type "int". The
41 /// alignment calculated is the minimum alignment, and not necessarily
42 /// the "desired" alignment returned by GCC's __alignof__ (for example). Note
43 /// that because the alignment is an enum value, it can be used as a
53 static constexpr unsigned Alignment =
56 enum { Alignment =
59 enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 };
60 enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };
61 enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 };
62 enum { Alignment_GreaterEqual_16Bytes = Alignment >= 16 ? 1 : 0 };
64 enum { Alignment_LessEqual_2Bytes = Alignment <= 2 ? 1 : 0 };
65 enum { Alignment_LessEqual_4Bytes = Alignment <= 4 ? 1 : 0 };
66 enum { Alignment_LessEqual_8Bytes = Alignment <= 8 ? 1 : 0 };
67 enum { Alignment_LessEqual_16Bytes = Alignment <= 16 ? 1 : 0 };
71 template <typename T> constexpr unsigned AlignOf<T>::Alignment;
74 /// alignOf - A templated function that returns the minimum alignment of
77 /// alignOf<int>() returns the alignment of an int.
79 inline unsigned alignOf() { return AlignOf<T>::Alignment; }
87 /// integer literal can be used to specify an alignment constraint. Once built
95 template<std::size_t Alignment, std::size_t Size>
97 alignas(Alignment) char buffer[Size];
102 template<std::size_t Alignment, std::size_t Size>
129 template<std::size_t Alignment, std::size_t Size>
134 // a member of a by-value function argument in MSVC, even if the alignment
136 // even include the declspec with the union that forces the alignment because
138 // proper alignment.
226 T6, T7, T8, T9, T10> >::Alignment,