标准库标头 <cstdalign> (C++11)(C++20 前), <stdalign.h> (C++11)

出自cppreference.com
< cpp‎ | header


 
 
標準庫頭
通用工具
<any> (C++17)
<bitset>
<bit> (C++20)
<charconv> (C++17)
<expected> (C++23)
<format> (C++20)
<functional>
<optional> (C++17)
<stdbit.h> (C++26)
<tuple> (C++11)
<typeindex> (C++11)
<utility>
<variant> (C++17)
容器
<array> (C++11)
<deque>
<flat_map> (C++23)
<flat_set> (C++23)
<forward_list> (C++11)
<hive> (C++26)
<inplace_vector> (C++26)   
<list>
<map>
<mdspan> (C++23)
<queue>
<set>
<span> (C++20)
<stack>
<unordered_map> (C++11)
<unordered_set> (C++11)
<vector>
迭代器
<iterator>
範圍
<generator> (C++23)
<ranges> (C++20)
演算法
<algorithm>
<numeric>
字元串
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
文本處理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
cpp/header#數值庫數值
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<stdckdint.h> (C++26)
<valarray>
時間
<chrono> (C++11)
<ctime>
C 兼容性
<ccomplex> (C++11/17/20*)
<ciso646> (C++20 前)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此標頭原作為 <stdalign.h> 存在於 C 標準庫。

C 兼容標頭。alignasalignof 在 C++ 中是關鍵詞,但在 C 中直到 C23 才成為關鍵詞。

__alignas_is_defined
(C++11)(棄用)
C 兼容宏常量,展開成整數字面量 1
(宏常量) [編輯]
__alignof_is_defined
(C++11)(棄用)
C 兼容宏常量,展開成整數字面量 1
(宏常量) [編輯]

[編輯] 註解

cstdalign 在 C++17 中棄用並在 C++20 中移除。對應的 <stdalign.h> 在 C++20 中仍可用。

[編輯] 缺陷報告

下列更改行為的缺陷報告追溯地應用於以前出版的 C++ 標準。

缺陷報告 應用於 出版時的行為 正確行為
LWG 3827 C++11 C 程序從 C23 起不再需要兼容性宏 __alignas_is_defined 在 C++ 中棄用該宏