diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:33:54 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:36:09 +0900 |
commit | d9ec475d945d3035377a0d89ed42e382d8988891 (patch) | |
tree | 34aff2cee4b209906243ab5499d61f3edee2982f /boost/smart_ptr | |
parent | 71d216b90256936a9638f325af9bc69d720e75de (diff) | |
download | boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.gz boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.bz2 boost-d9ec475d945d3035377a0d89ed42e382d8988891.zip |
Imported Upstream version 1.60.0
Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/smart_ptr')
-rw-r--r-- | boost/smart_ptr/detail/operator_bool.hpp | 3 | ||||
-rw-r--r-- | boost/smart_ptr/detail/shared_count.hpp | 10 | ||||
-rw-r--r-- | boost/smart_ptr/detail/sp_disable_deprecated.hpp | 40 | ||||
-rw-r--r-- | boost/smart_ptr/detail/sp_interlocked.hpp | 11 | ||||
-rw-r--r-- | boost/smart_ptr/detail/yield_k.hpp | 9 | ||||
-rw-r--r-- | boost/smart_ptr/scoped_ptr.hpp | 10 | ||||
-rw-r--r-- | boost/smart_ptr/shared_ptr.hpp | 10 |
7 files changed, 92 insertions, 1 deletions
diff --git a/boost/smart_ptr/detail/operator_bool.hpp b/boost/smart_ptr/detail/operator_bool.hpp index 8ae1527e7c..c0289b870b 100644 --- a/boost/smart_ptr/detail/operator_bool.hpp +++ b/boost/smart_ptr/detail/operator_bool.hpp @@ -6,7 +6,8 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR ) +#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\ + && !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130)) explicit operator bool () const BOOST_NOEXCEPT { diff --git a/boost/smart_ptr/detail/shared_count.hpp b/boost/smart_ptr/detail/shared_count.hpp index cd07ed65fc..7996aa4325 100644 --- a/boost/smart_ptr/detail/shared_count.hpp +++ b/boost/smart_ptr/detail/shared_count.hpp @@ -28,6 +28,7 @@ #include <boost/smart_ptr/bad_weak_ptr.hpp> #include <boost/smart_ptr/detail/sp_counted_base.hpp> #include <boost/smart_ptr/detail/sp_counted_impl.hpp> +#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp> #include <boost/detail/workaround.hpp> // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of <memory> doesn't try to @@ -42,6 +43,11 @@ #include <boost/core/addressof.hpp> +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + namespace boost { @@ -692,6 +698,10 @@ inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( } // namespace boost +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic pop +#endif + #ifdef __BORLANDC__ # pragma warn .8027 // Functions containing try are not expanded inline #endif diff --git a/boost/smart_ptr/detail/sp_disable_deprecated.hpp b/boost/smart_ptr/detail/sp_disable_deprecated.hpp new file mode 100644 index 0000000000..f79bdf38a8 --- /dev/null +++ b/boost/smart_ptr/detail/sp_disable_deprecated.hpp @@ -0,0 +1,40 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_DISABLE_DEPRECATED_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_DISABLE_DEPRECATED_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/smart_ptr/detail/sp_disable_deprecated.hpp +// +// Copyright 2015 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) +// + +#include <boost/config.hpp> + +#if defined( __GNUC__ ) && ( defined( __GXX_EXPERIMENTAL_CXX0X__ ) || ( __cplusplus >= 201103L ) ) + +# if defined( BOOST_GCC ) + +# if BOOST_GCC >= 40600 +# define BOOST_SP_DISABLE_DEPRECATED +# endif + +# elif defined( __clang__ ) && defined( __has_warning ) + +# if __has_warning( "-Wdeprecated-declarations" ) +# define BOOST_SP_DISABLE_DEPRECATED +# endif + +# endif + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_DISABLE_DEPRECATED_HPP_INCLUDED diff --git a/boost/smart_ptr/detail/sp_interlocked.hpp b/boost/smart_ptr/detail/sp_interlocked.hpp index 814b0c2e93..79cae14a37 100644 --- a/boost/smart_ptr/detail/sp_interlocked.hpp +++ b/boost/smart_ptr/detail/sp_interlocked.hpp @@ -111,6 +111,17 @@ extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); +# if defined( BOOST_MSVC ) && BOOST_MSVC == 1310 +//From MSDN, Visual Studio .NET 2003 spedific: To declare one of the interlocked functions +//for use as an intrinsic, the function must be declared with the leading underscore and +//the new function must appear in a #pragma intrinsic statement. +# pragma intrinsic( _InterlockedIncrement ) +# pragma intrinsic( _InterlockedDecrement ) +# pragma intrinsic( _InterlockedCompareExchange ) +# pragma intrinsic( _InterlockedExchange ) +# pragma intrinsic( _InterlockedExchangeAdd ) +# endif + #endif # define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement diff --git a/boost/smart_ptr/detail/yield_k.hpp b/boost/smart_ptr/detail/yield_k.hpp index 2dabc9f443..44d1836478 100644 --- a/boost/smart_ptr/detail/yield_k.hpp +++ b/boost/smart_ptr/detail/yield_k.hpp @@ -60,7 +60,16 @@ namespace detail { #if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME +#if !BOOST_COMP_CLANG || !defined __MINGW32__ extern "C" void __stdcall Sleep( unsigned long ms ); +#else +#include <_mingw.h> +#if !defined __MINGW64_VERSION_MAJOR + extern "C" void __stdcall Sleep( unsigned long ms ); +#else + extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms ); +#endif +#endif #endif inline void yield( unsigned k ) diff --git a/boost/smart_ptr/scoped_ptr.hpp b/boost/smart_ptr/scoped_ptr.hpp index be6722d5f5..d5d8720f52 100644 --- a/boost/smart_ptr/scoped_ptr.hpp +++ b/boost/smart_ptr/scoped_ptr.hpp @@ -15,12 +15,18 @@ #include <boost/assert.hpp> #include <boost/checked_delete.hpp> #include <boost/smart_ptr/detail/sp_nullptr_t.hpp> +#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp> #include <boost/detail/workaround.hpp> #ifndef BOOST_NO_AUTO_PTR # include <memory> // for std::auto_ptr #endif +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + namespace boost { @@ -154,4 +160,8 @@ template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_NOEXCEPT } // namespace boost +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic pop +#endif + #endif // #ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED diff --git a/boost/smart_ptr/shared_ptr.hpp b/boost/smart_ptr/shared_ptr.hpp index 991ca3dad3..47bc33d517 100644 --- a/boost/smart_ptr/shared_ptr.hpp +++ b/boost/smart_ptr/shared_ptr.hpp @@ -29,6 +29,7 @@ #include <boost/detail/workaround.hpp> #include <boost/smart_ptr/detail/sp_convertible.hpp> #include <boost/smart_ptr/detail/sp_nullptr_t.hpp> +#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp> #if !defined(BOOST_SP_NO_ATOMIC_ACCESS) #include <boost/smart_ptr/detail/spinlock_pool.hpp> @@ -47,6 +48,11 @@ #endif #endif +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + namespace boost { @@ -1064,4 +1070,8 @@ template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOO } // namespace boost +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic pop +#endif + #endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED |