Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 633 Bytes

AlignOf.md

File metadata and controls

29 lines (23 loc) · 633 Bytes

<CppML/TypeTraits/AlignOf.hpp>

AlignOf

template <typename Pipe = ml::Identity>
struct AlignOf {
  template <typename T>
  using f = /* .... */;
};

AlignOf<Pipe>

AlignOf<Pipe> is a metafunction that passes to Pipe an ml::Int<aligment>, where aligment is the alignment of T. Pipe defaults to ml::Identity.

f::  T ->  ml::Int<alignmentOf(T)> <-> Pipe

Example

using T = ml::f<
                ml::AlignOf<>,
                double>;
static_assert( std::is_same_v<
                          T0,
                          ml::Int<8>>);