is_set_type_of.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 detail/is_set_type_of.hpp
  9. /// \brief Is set type of and is set type of relation metafunctions.
  10. #ifndef BOOST_BIMAP_DETAIL_IS_SET_TYPE_OF_HPP
  11. #define BOOST_BIMAP_DETAIL_IS_SET_TYPE_OF_HPP
  12. #if defined(_MSC_VER)
  13. #pragma once
  14. #endif
  15. #include <boost/config.hpp>
  16. #include <boost/type_traits/is_base_of.hpp>
  17. #include <boost/bimap/detail/concept_tags.hpp>
  18. /** \struct boost::bimaps::detail::is_set_type_of
  19. \brief Type trait to check if a class is a set_type_of specification
  20. \code
  21. template< class Type >
  22. struct is_set_type_of : {true_|false_} {};
  23. \endcode
  24. **/
  25. /** \struct boost::bimaps::detail::is_set_type_of_relation
  26. \brief Type trait to check if a class is a set_type_of_relation specification
  27. \code
  28. template< class Type >
  29. struct is_set_type_of_relation : {true_|false_} {};
  30. \endcode
  31. **/
  32. #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
  33. namespace boost {
  34. namespace bimaps {
  35. namespace detail {
  36. template< class Type >
  37. struct is_set_type_of :
  38. is_base_of< set_type_of_tag, Type > {};
  39. template< class Type >
  40. struct is_set_type_of_relation :
  41. is_base_of< set_type_of_relation_tag, Type > {};
  42. } // namespace detail
  43. } // namespace bimaps
  44. } // namespace boost
  45. #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
  46. #endif // BOOST_BIMAP_DETAIL_IS_SET_TYPE_OF_HPP