CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
cpp.h
1
#pragma once
2
3
// We don't really like C++, but sometimes it is a necessary evil when
4
// header files are pulled into unusual places.
5
6
#ifdef __cplusplus
7
#define CX_C extern "C"
8
#define CX_C_BEGIN \
9
extern "C" \
10
{
11
#define CX_C_END }
12
#else
13
#define CX_C
14
#define CX_C_BEGIN
15
#define CX_C_END
16
#endif
17
18
#ifdef __cplusplus
19
// _Static_assert is a C11 keyword; in C++ it maps to the static_assert keyword.
20
// On MSVC this is already handled in platform/base.h, so only define it elsewhere,
21
// and guard against it already being provided.
22
#if !defined(_MSC_VER) && !defined(_Static_assert)
23
#define _Static_assert static_assert
24
#endif
25
// The 'register' storage-class keyword was removed in C++17. Expand it away in C++
26
// so shared macros (e.g. foreach) that emit it stay valid in both languages.
27
#define _cx_keyword_register
28
#else
29
#define _cx_keyword_register register
30
#endif
cx
platform
cpp.h
Generated by
1.9.8