From b6e7c9bd7a160c07c5de894292022687895c17a3 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Fri, 11 Aug 2017 13:56:20 +0100 Subject: [PATCH] Specialise removeConst for nullptr --- include/internal/catch_evaluate.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/internal/catch_evaluate.hpp b/include/internal/catch_evaluate.hpp index 345f90c2..8a7ed288 100644 --- a/include/internal/catch_evaluate.hpp +++ b/include/internal/catch_evaluate.hpp @@ -39,6 +39,9 @@ namespace Internal { template T& removeConst(T const &t) { return const_cast(t); } +#ifdef CATCH_CONFIG_CPP11_NULLPTR + inline std::nullptr_t removeConst(std::nullptr_t) { return nullptr; } +#endif // So the compare overloads can be operator agnostic we convey the operator as a template