Specialise removeConst for nullptr

This commit is contained in:
Phil Nash 2017-08-11 13:56:20 +01:00 committed by Martin Hořeňovský
parent 180d9242f5
commit b6e7c9bd7a

View File

@ -39,6 +39,9 @@ namespace Internal {
template<typename T> template<typename T>
T& removeConst(T const &t) { return const_cast<T&>(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 // So the compare overloads can be operator agnostic we convey the operator as a template