Use explicit operator bool when available; add nullptr support to shared_ptr. Refs #4116.

[SVN r81780]
This commit is contained in:
Peter Dimov committed 2012-12-08 00:51:59 +00:00
1 parent 7a4ad75f5d
commit 8093967da7
9 files changed
+386 -3

No files matched your search

@@ -1,12 +1,19 @@
// This header intentionally has no include guards.
//
// Copyright (c) 2001-2009 Peter Dimov
// Copyright (c) 2001-2009, 2012 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )
explicit operator bool () const BOOST_NOEXCEPT
{
return px != 0;
}
#elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
operator bool () const BOOST_NOEXCEPT
{