Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 936 Bytes

alignment-of-class.md

File metadata and controls

38 lines (26 loc) · 936 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: alignment_of Class
alignment_of Class
12/11/2019
type_traits/std::alignment_of
alignment_of class
alignment_of
4141c59a-f94e-41c4-93fd-9ea578b27387

alignment_of Class

Gets alignment of the specified type. This struct is implemented in terms of alignof. Use alignof directly when you simply need to query an alignment value. Use alignment_of when you need an integral constant, for example when doing tag dispatch.

Syntax

template <class Ty>
struct alignment_of;

Parameters

Ty
The type to query.

Remarks

The type query holds the value of the alignment of the type Ty.

Requirements

Header: <type_traits>

Namespace: std

See also

<type_traits>
aligned_storage Class