Skip to content

Commit

Permalink
Extend documentation of alignment helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Dec 5, 2022
1 parent 56e0fbb commit 95f0895
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/llama/Core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,15 +440,17 @@ namespace llama
}
} // namespace internal

/// The alignment of a type list if its elements would be in a normal struct.
/// The alignment of a type list if its elements would be in a normal struct. Effectively returns the maximum
/// alignment value in the type list.
template<typename TypeList>
inline constexpr std::size_t flatAlignOf = internal::flatAlignOfImpl<TypeList>();

/// The alignment of a type T.
template<typename T>
inline constexpr std::size_t alignOf = alignof(T);

/// The alignment of a record dimension if its fields would be in a normal struct.
/// The alignment of a record dimension if its fields would be in a normal struct. Effectively returns the maximum
/// alignment value in the type list.
template<typename... Fields>
inline constexpr std::size_t alignOf<Record<Fields...>> = flatAlignOf<FlatRecordDim<Record<Fields...>>>;

Expand Down

0 comments on commit 95f0895

Please sign in to comment.