Skip to content

Commit 7f947ff

Browse files
committed
Add definition for _Bool in C++ mode
_Bool is not defined when importing Foundation with C++ interop enabled resulting in the missing type. This patch defines _Bool to bool when compiling for C++.
1 parent d248649 commit 7f947ff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CoreFoundation/Base.subproj/CFBase.h

+5
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
#if !defined(__MACTYPES__)
8181
#if !defined(_OS_OSTYPES_H)
8282
#if DEPLOYMENT_RUNTIME_SWIFT
83+
84+
#ifdef __cplusplus
85+
#define _Bool bool
86+
#endif
87+
8388
typedef _Bool Boolean;
8489
#else
8590
typedef unsigned char Boolean;

0 commit comments

Comments
 (0)