A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../error/error_code/../../types/max_align_t.html below:

std::max_align_t - cppreference.com

typedef /* implementation-defined */ max_align_t;

(since C++11)

std::max_align_t is a standard-layout TrivialType(until C++26)TriviallyCopyable type(since C++26) whose alignment requirement is at least as strict (as large) as that of every scalar type.

std::is_trivially_default_constructible_v<std::max_align_t> is true.

[edit] Notes

Pointers returned by allocation functions such as std::malloc are suitably aligned for any object, which means they are aligned at least as strictly as std::max_align_t.

[edit] Example
#include <cstddef>
#include <iostream>
 
int main()
{
    std::cout << alignof(std::max_align_t) << '\n';
}

Possible output:

[edit] References
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4