diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:05:34 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:06:28 +0900 |
commit | 34bd32e225e2a8a94104489b31c42e5801cc1f4a (patch) | |
tree | d021b579a0c190354819974e1eaf0baa54b551f3 /boost/python/detail | |
parent | f763a99a501650eff2c60288aa6f10ef916d769e (diff) | |
download | boost-34bd32e225e2a8a94104489b31c42e5801cc1f4a.tar.gz boost-34bd32e225e2a8a94104489b31c42e5801cc1f4a.tar.bz2 boost-34bd32e225e2a8a94104489b31c42e5801cc1f4a.zip |
Imported Upstream version 1.63.0upstream/1.63.0
Change-Id: Iac85556a04b7e58d63ba636dedb0986e3555714a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/python/detail')
-rwxr-xr-x | boost/python/detail/is_shared_ptr.hpp | 18 | ||||
-rw-r--r-- | boost/python/detail/value_is_shared_ptr.hpp | 23 |
2 files changed, 29 insertions, 12 deletions
diff --git a/boost/python/detail/is_shared_ptr.hpp b/boost/python/detail/is_shared_ptr.hpp index 547af3f1cb..bef0e05afb 100755 --- a/boost/python/detail/is_shared_ptr.hpp +++ b/boost/python/detail/is_shared_ptr.hpp @@ -1,17 +1,23 @@ // Copyright David Abrahams 2003. +// Copyright Stefan Seefeld 2016. // 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) -#ifndef IS_SHARED_PTR_DWA2003224_HPP -# define IS_SHARED_PTR_DWA2003224_HPP -# include <boost/python/detail/is_xxx.hpp> -# include <boost/shared_ptr.hpp> +#ifndef boost_python_detail_is_shared_ptr_hpp_ +#define boost_python_detail_is_shared_ptr_hpp_ + +#include <boost/python/detail/is_xxx.hpp> +#include <boost/shared_ptr.hpp> namespace boost { namespace python { namespace detail { BOOST_PYTHON_IS_XXX_DEF(shared_ptr, shared_ptr, 1) - +#if __cplusplus >= 201103L +template <typename T> +struct is_shared_ptr<std::shared_ptr<T> > : std::true_type {}; +#endif + }}} // namespace boost::python::detail -#endif // IS_SHARED_PTR_DWA2003224_HPP +#endif diff --git a/boost/python/detail/value_is_shared_ptr.hpp b/boost/python/detail/value_is_shared_ptr.hpp index 361c369b5b..53e687f016 100644 --- a/boost/python/detail/value_is_shared_ptr.hpp +++ b/boost/python/detail/value_is_shared_ptr.hpp @@ -1,17 +1,28 @@ // Copyright David Abrahams 2003. +// Copyright Stefan Seefeld 2016. // 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) -#ifndef VALUE_IS_SHARED_PTR_DWA2003224_HPP -# define VALUE_IS_SHARED_PTR_DWA2003224_HPP -# include <boost/python/detail/value_is_xxx.hpp> -# include <boost/shared_ptr.hpp> +#ifndef boost_python_detail_value_is_shared_ptr_hpp_ +#define boost_python_detail_value_is_shared_ptr_hpp_ + +#include <boost/python/detail/value_is_xxx.hpp> +#include <boost/python/detail/is_shared_ptr.hpp> namespace boost { namespace python { namespace detail { -BOOST_PYTHON_VALUE_IS_XXX_DEF(shared_ptr, shared_ptr, 1) - +template <class X_> +struct value_is_shared_ptr +{ + static bool const value = is_shared_ptr<typename remove_cv< + typename remove_reference<X_> + ::type> + ::type> + ::value; + typedef mpl::bool_<value> type; +}; + }}} // namespace boost::python::detail #endif // VALUE_IS_SHARED_PTR_DWA2003224_HPP |