# C++ keyword: alignof (since C++11)

> C++ Atlas: `cppatlas.com/w/cpp/keyword/alignof` | Source: https://en.cppreference.com/w/cpp/keyword/alignof | Domain: Keywords

## Official Specification Summary (cppreference)

### Usage

- `alignof` operator

### Example

```cpp
#include <cstddef>
#include <iostream>

int main()
{
    std::cout << alignof(std::max_align_t) << '\n';
}
```

Possible output:

```text
16
```

### See also

- [`alignas`](https://en.cppreference.com/w/cpp/keyword/alignas)

---
Attribution: content from https://en.cppreference.com/w/cpp/keyword/alignof (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.