/Src/Dependencies/Boost/boost/mpl/aux_/type_wrapper.hpp

http://hadesmem.googlecode.com/ · C++ Header · 47 lines · 22 code · 10 blank · 15 comment · 0 complexity · 7a6c96a42ea5dff6633d31ad100b1b0a MD5 · raw file

  1. #ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED
  2. #define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED
  3. // Copyright Aleksey Gurtovoy 2000-2004
  4. // Copyright Peter Dimov 2000-2003
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // See http://www.boost.org/libs/mpl for documentation.
  11. // $Id: type_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
  12. // $Date: 2008-10-11 17:19:02 +1100 (Sat, 11 Oct 2008) $
  13. // $Revision: 49267 $
  14. #include <boost/mpl/aux_/config/ctps.hpp>
  15. namespace boost { namespace mpl { namespace aux {
  16. template< typename T > struct type_wrapper
  17. {
  18. typedef T type;
  19. };
  20. #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
  21. // agurt 08/may/03: a complicated way to extract the wrapped type; need it
  22. // mostly for the sake of GCC (3.2.x), which ICEs if you try to extract the
  23. // nested 'type' from 'type_wrapper<T>' when the latter was the result of a
  24. // 'typeof' expression
  25. template< typename T > struct wrapped_type;
  26. template< typename T > struct wrapped_type< type_wrapper<T> >
  27. {
  28. typedef T type;
  29. };
  30. #else
  31. template< typename W > struct wrapped_type
  32. {
  33. typedef typename W::type type;
  34. };
  35. #endif
  36. }}}
  37. #endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED