From 8539131b2a21ee39f8996710dd6206e991aa3d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 16 Sep 2014 22:18:49 +0200 Subject: [PATCH] Workaround for compilers with no std::nullptr_t in --- include/boost/move/default_delete.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/boost/move/default_delete.hpp b/include/boost/move/default_delete.hpp index d8ad360..ef31719 100644 --- a/include/boost/move/default_delete.hpp +++ b/include/boost/move/default_delete.hpp @@ -17,7 +17,7 @@ #include #include -#include //For std::size_t +#include //For std::size_t,std::nullptr_t //!\file //! Describes the default deleter (destruction policy) of unique_ptr: default_delete. @@ -79,10 +79,12 @@ struct enable_defdel_call struct bool_conversion {int for_bool; int for_arg(); }; typedef int bool_conversion::* explicit_bool_arg; -#if !defined(BOOST_NO_CXX11_NULLPTR) -typedef std::nullptr_t nullptr_type; +#if !defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_CXX11_DECLTYPE) + typedef decltype(nullptr) nullptr_type; +#elif !defined(BOOST_NO_CXX11_NULLPTR) + typedef std::nullptr_t nullptr_type; #else -typedef int (bool_conversion::*nullptr_type)(); + typedef int (bool_conversion::*nullptr_type)(); #endif } //namespace move_upd {