diff --git a/CHANGELOG.md b/CHANGELOG.md index 68cc609c..bfeb713c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Removed ### Fixed +- Don't define `ostream& operator<<(nullptr_t)` if already defined by Apple ### Security diff --git a/cpp/unittest/OstreamHelpers.h b/cpp/unittest/OstreamHelpers.h index a2cd8f45..14280d3a 100644 --- a/cpp/unittest/OstreamHelpers.h +++ b/cpp/unittest/OstreamHelpers.h @@ -2,4 +2,8 @@ #include +#if (defined __apple_build_version__) && (__apple_build_version__ >= 12000000) +// defined in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:223:20 +#else inline std::ostream& operator << (std::ostream& out, const std::nullptr_t &np) { return out << "nullptr"; } +#endif