Refactored to introduce MOCK_NULLPTR

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@672 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-07-06 21:19:20 +00:00
parent 5c82c8052f
commit 4f5090c109
6 changed files with 13 additions and 6 deletions

View file

@ -53,6 +53,12 @@
# endif
#endif
#if !defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
# ifndef MOCK_NO_NULLPTR
# define MOCK_NULLPTR
# endif
#endif
#if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
# ifndef MOCK_NO_DECLTYPE
# define MOCK_DECLTYPE

View file

@ -9,6 +9,7 @@
#ifndef MOCK_ADDRESSOF_HPP_INCLUDED
#define MOCK_ADDRESSOF_HPP_INCLUDED
#include "../config.hpp"
#include <boost/utility/addressof.hpp>
namespace mock
@ -17,7 +18,7 @@ namespace detail
{
using boost::addressof;
#if !defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
#ifdef MOCK_NULLPTR
inline const std::nullptr_t* addressof( const std::nullptr_t& p )
{

View file

@ -137,7 +137,7 @@ namespace detail
{
return s << '?';
}
#if !defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
#ifdef MOCK_NULLPTR
inline stream& operator<<( stream& s, std::nullptr_t )
{
return s << "nullptr";