pointee.cpp 964 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright David Abrahams 2002.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/python/pointee.hpp>
  6. #include <boost/python/detail/type_traits.hpp>
  7. #include <memory>
  8. #include <boost/shared_ptr.hpp>
  9. #include <boost/static_assert.hpp>
  10. struct A;
  11. int main()
  12. {
  13. BOOST_STATIC_ASSERT(
  14. (boost::python::detail::is_same<
  15. boost::python::pointee<std::auto_ptr<char**> >::type
  16. , char**
  17. >::value));
  18. BOOST_STATIC_ASSERT(
  19. (boost::python::detail::is_same<
  20. boost::python::pointee<boost::shared_ptr<A> >::type
  21. , A>::value));
  22. #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  23. BOOST_STATIC_ASSERT(
  24. (boost::python::detail::is_same<
  25. boost::python::pointee<char*>::type
  26. , char
  27. >::value));
  28. #endif
  29. return 0;
  30. }