key_type_by.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Boost.Bimap
  2. //
  3. // Copyright (c) 2006-2007 Matias Capeletto
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. /// \file support/key_type_by.hpp
  9. /// \brief Metafunction to access the set types of a bimap
  10. #ifndef BOOST_BIMAP_SUPPORT_KEY_TYPE_BY_HPP
  11. #define BOOST_BIMAP_SUPPORT_KEY_TYPE_BY_HPP
  12. #if defined(_MSC_VER)
  13. #pragma once
  14. #endif
  15. #include <boost/config.hpp>
  16. #include <boost/bimap/relation/detail/metadata_access_builder.hpp>
  17. /** \struct boost::bimaps::support::key_type_by
  18. \brief Metafunction to obtain the key type of one of the sides in a bimap
  19. The tag parameter can be either a user defined tag or \c member_at::{side}.
  20. The returned type is one of the {SetType}_of definition classes.
  21. \code
  22. template< class Tag, class Bimap >
  23. struct key_type_by
  24. {
  25. typedef typename Bimap::{side}_key_type type;
  26. };
  27. \endcode
  28. See also member_at.
  29. \ingroup bimap_group
  30. **/
  31. namespace boost {
  32. namespace bimaps {
  33. namespace support {
  34. // Implementation of key type type of metafunction
  35. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  36. (
  37. key_type_by,
  38. left_key_type,
  39. right_key_type
  40. )
  41. } // namespace support
  42. } // namespace bimaps
  43. } // namespace boost
  44. #endif // BOOST_BIMAP_SUPPORT_KEY_TYPE_BY_HPP