Skip to content

Commit 49e885a

Browse files
committed
[cxx-interop] Don't include unicode/ucal in C++ mode.
This is exported as a C header but in C++ mode ucal.h will expose templates that aren't valid. When a program uses the flag "-enable-cxx-interop" this library will be imported in a C++ context so we can only have valid C++ code.
1 parent 9ebb444 commit 49e885a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/Locale.subproj/CFCalendar_Internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CFDateComponents.h"
2020
#include "CFDateInterval.h"
2121

22-
#if __has_include(<unicode/ucal.h>)
22+
#if __has_include(<unicode/ucal.h>) && !defined(__cplusplus)
2323
#include <unicode/ucal.h>
2424
#else
2525
typedef void *UCalendar;

0 commit comments

Comments
 (0)