value_is_shared_ptr.hpp 810 B

12345678910111213141516171819202122232425262728
  1. // Copyright David Abrahams 2003.
  2. // Copyright Stefan Seefeld 2016.
  3. // Distributed under the Boost Software License, Version 1.0. (See
  4. // accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. #ifndef boost_python_detail_value_is_shared_ptr_hpp_
  7. #define boost_python_detail_value_is_shared_ptr_hpp_
  8. #include <boost/python/detail/value_is_xxx.hpp>
  9. #include <boost/python/detail/is_shared_ptr.hpp>
  10. namespace boost { namespace python { namespace detail {
  11. template <class X_>
  12. struct value_is_shared_ptr
  13. {
  14. static bool const value = is_shared_ptr<typename remove_cv<
  15. typename remove_reference<X_>
  16. ::type>
  17. ::type>
  18. ::value;
  19. typedef mpl::bool_<value> type;
  20. };
  21. }}} // namespace boost::python::detail
  22. #endif // VALUE_IS_SHARED_PTR_DWA2003224_HPP