From fdc151e19576aa568ac7c5a8962091fa46f0aeaa Mon Sep 17 00:00:00 2001 From: James Foster Date: Mon, 5 Oct 2020 00:32:16 -0700 Subject: [PATCH 1/2] Don't define ostream& operator() if already defined by Apple. --- cpp/unittest/OstreamHelpers.h | 4 ++++ 1 file changed, 4 insertions(+) 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 From d987a3c8c1da6bc6bc80e7331728a4346b47eaa9 Mon Sep 17 00:00:00 2001 From: James Foster Date: Mon, 5 Oct 2020 11:27:55 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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