Skip to content

Commit 6dcdbe6

Browse files
Benjamin Gwincarlescufi
authored andcommitted
cpp: Include additional contents in <cstddef>
Similar to <cstdint>, this file should provide the contents of stddef.h for C++ users. Signed-off-by: Benjamin Gwin <[email protected]>
1 parent dfffc27 commit 6dcdbe6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

subsys/cpp/include/cstddef

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,17 @@
99
*
1010
* @brief Stub header allowing compilation of `#include <cstddef>`
1111
*/
12+
13+
#ifndef ZEPHYR_SUBSYS_CPP_INCLUDE_CSTDDEF_
14+
#define ZEPHYR_SUBSYS_CPP_INCLUDE_CSTDDEF_
15+
16+
#include <stddef.h>
17+
18+
namespace std {
19+
using ::ptrdiff_t;
20+
using ::size_t;
21+
using ::max_align_t;
22+
using nullptr_t = decltype(nullptr);
23+
}
24+
25+
#endif /* ZEPHYR_SUBSYS_CPP_INCLUDE_CSTDDEF_ */

0 commit comments

Comments
 (0)