1
0
forked from boostorg/core

Make BOOST_TEST_EQ/NE work with nullptr

This commit is contained in:
Peter Dimov
2017-05-29 21:15:49 +03:00
parent f76116405d
commit 637b2ffaff
3 changed files with 35 additions and 0 deletions
+5
View File
@@ -25,6 +25,7 @@
#include <boost/core/no_exceptions_support.hpp>
#include <iostream>
#include <cstring>
#include <cstddef>
// IDE's like Visual Studio perform better if output goes to std::cout or
// some other stream, so allow user to configure output stream:
@@ -113,6 +114,10 @@ inline const void* test_output_impl(unsigned char* v) { return v; }
inline const void* test_output_impl(signed char* v) { return v; }
template<class T> inline const void* test_output_impl(T volatile* v) { return const_cast<T*>(v); }
#if !defined( BOOST_NO_CXX11_NULLPTR )
inline const void* test_output_impl(std::nullptr_t v) { return v; }
#endif
template<class T, class U> inline void test_eq_impl( char const * expr1, char const * expr2,
char const * file, int line, char const * function, T const & t, U const & u )
{