GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::max_align_t(3) C++ Standard Libary std::max_align_t(3)

std::max_align_t - std::max_align_t


Defined in header <cstddef>
typedef /*implementation-defined*/ max_align_t; (since C++11)


std::max_align_t is a trivial standard-layout type whose alignment requirement is at
least as strict (as large) as that of every scalar type.


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.


std::max_align_t is usually synonymous with the largest scalar type, which is long
double on most platforms, and its alignment requirement is either 8 or 16.

// Run this code


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


16


* C++20 standard (ISO/IEC 14882:2020):


* 17.2.4 Sizes, alignments, and offsets [support.types.layout] (p:
507-508)


* C++17 standard (ISO/IEC 14882:2017):


* 21.2.4 Sizes, alignments, and offsets [support.types.layout] (p: 479)


* C++14 standard (ISO/IEC 14882:2014):


* 18.2 Types [support.types] (p: 443-444)


* C++11 standard (ISO/IEC 14882:2011):


* 18.2 Types [support.types] (p: 454-455)


alignof operator(C++11) queries alignment requirements of a type
alignment_of obtains the type's alignment requirements
(C++11) (class template)
is_scalar checks if a type is a scalar type
(C++11) (class template)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.