misc_concept.hpp 822 B

123456789101112131415161718192021222324252627282930313233
  1. // Boost.Range library concept checks
  2. //
  3. // Copyright Neil Groves 2009. Use, modification and distribution
  4. // are subject to the Boost Software License, Version 1.0. (See
  5. // accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. #ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
  9. #define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
  10. #include <boost/concept_check.hpp>
  11. namespace boost
  12. {
  13. namespace range_detail
  14. {
  15. template<typename T1, typename T2>
  16. class SameTypeConcept
  17. {
  18. public:
  19. BOOST_CONCEPT_USAGE(SameTypeConcept)
  20. {
  21. same_type(a,b);
  22. }
  23. private:
  24. template<typename T> void same_type(T,T) {}
  25. T1 a;
  26. T2 b;
  27. };
  28. }
  29. }
  30. #endif // include guard