unwrap_type_id.hpp 706 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright David Abrahams 2004. Distributed under the Boost
  2. // Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef UNWRAP_TYPE_ID_DWA2004722_HPP
  5. # define UNWRAP_TYPE_ID_DWA2004722_HPP
  6. # include <boost/python/type_id.hpp>
  7. # include <boost/mpl/bool.hpp>
  8. namespace boost { namespace python {
  9. template <class T> class wrapper;
  10. namespace detail {
  11. template <class T>
  12. inline type_info unwrap_type_id(T*, ...)
  13. {
  14. return type_id<T>();
  15. }
  16. template <class U, class T>
  17. inline type_info unwrap_type_id(U*, wrapper<T>*)
  18. {
  19. return type_id<T>();
  20. }
  21. }}} // namespace boost::python::detail
  22. #endif // UNWRAP_TYPE_ID_DWA2004722_HPP