pair_type_by.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 relation/support/pair_type_by.hpp
  9. /// \brief pair_type_by<tag,relation> metafunction
  10. #ifndef BOOST_BIMAP_RELATION_SUPPORT_PAIR_TYPE_BY_HPP
  11. #define BOOST_BIMAP_RELATION_SUPPORT_PAIR_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::relation::support::pair_type_by
  18. \brief Metafunction to obtain the view type indexed by one of the sides.
  19. \code
  20. template< class Tag, class Relation >
  21. struct pair_type_by
  22. {
  23. typedef {signature-compatible with std::pair} type;
  24. };
  25. \endcode
  26. See also member_at, pair_by().
  27. \ingroup relation_group
  28. **/
  29. namespace boost {
  30. namespace bimaps {
  31. namespace relation {
  32. namespace support {
  33. // Implementation of pair type by metafunction
  34. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  35. (
  36. pair_type_by,
  37. left_pair,
  38. right_pair
  39. )
  40. } // namespace support
  41. } // namespace relation
  42. } // namespace bimaps
  43. } // namespace boost
  44. #endif // BOOST_BIMAP_RELATION_SUPPORT_PAIR_BY_TYPE_HPP