Skip to content

Commit 9df75db

Browse files
author
James Foster
authored
Don't define ostream& operator() if already defined by Apple (Arduino-CI#171)
* Don't define ostream& operator() if already defined by Apple.
1 parent 9f0b430 commit 9df75db

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1616
### Removed
1717

1818
### Fixed
19+
- Don't define `ostream& operator<<(nullptr_t)` if already defined by Apple
1920

2021
### Security
2122

cpp/unittest/OstreamHelpers.h

+4
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
#include <ostream>
44

5+
#if (defined __apple_build_version__) && (__apple_build_version__ >= 12000000)
6+
// defined in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:223:20
7+
#else
58
inline std::ostream& operator << (std::ostream& out, const std::nullptr_t &np) { return out << "nullptr"; }
9+
#endif

0 commit comments

Comments
 (0)