catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Specialise removeConst for nullptr
- Commit
b6e7c9bd7a160c07c5de894292022687895c17a3- Author
- Phil Nash ·
- Committer
- Martin Hořeňovský
- Parents
180d9242f505
Changes
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<typename T> T& removeConst(T const &t) { return const_cast<T&>(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