meta_functions.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // Boost.Pointer Container
  3. //
  4. // Copyright Thorsten Ottosen 2008. Use, modification and
  5. // distribution is subject to the Boost Software License, Version
  6. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // For more information, see http://www.boost.org/libs/ptr_container/
  10. //
  11. #ifndef BOOST_PTR_CONTAINER_DETAIL_META_FUNCTIONS
  12. #define BOOST_PTR_CONTAINER_DETAIL_META_FUNCTIONS
  13. #include <boost/mpl/identity.hpp>
  14. #include <boost/mpl/eval_if.hpp>
  15. namespace boost
  16. {
  17. namespace ptr_container_detail
  18. {
  19. template< class T >
  20. struct select_value_compare
  21. {
  22. typedef typename T::value_compare type;
  23. };
  24. template< class T >
  25. struct select_key_compare
  26. {
  27. typedef typename T::key_compare type;
  28. };
  29. template< class T >
  30. struct select_hasher
  31. {
  32. typedef typename T::hasher type;
  33. };
  34. template< class T >
  35. struct select_key_equal
  36. {
  37. typedef typename T::key_equal type;
  38. };
  39. template< class T >
  40. struct select_iterator
  41. {
  42. typedef typename T::iterator type;
  43. };
  44. template< class T >
  45. struct select_local_iterator
  46. {
  47. typedef typename T::local_iterator type;
  48. };
  49. template< class T >
  50. struct select_const_local_iterator
  51. {
  52. typedef typename T::const_local_iterator type;
  53. };
  54. }
  55. }
  56. #endif