has_find.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Copyright 2005 Daniel Wallin.
  3. // Copyright 2005 Joel de Guzman.
  4. // Copyright 2015 John Fletcher
  5. //
  6. // Use, modification and distribution is subject to the Boost Software
  7. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // Modeled after range_ex, Copyright 2004 Eric Niebler
  11. ///////////////////////////////////////////////////////////////////////////////
  12. //
  13. // has_find.hpp
  14. //
  15. /////////////////////////////////////////////////////////////////////////////
  16. #ifndef BOOST_PHOENIX_HAS_FIND_EN_14_12_2004
  17. #define BOOST_PHOENIX_HAS_FIND_EN_14_12_2004
  18. #include <boost/mpl/or.hpp>
  19. #include "./is_std_map.hpp"
  20. #include "./is_std_set.hpp"
  21. #include "./is_std_hash_map.hpp"
  22. #include "./is_std_hash_set.hpp"
  23. #include "./is_unordered_set_or_map.hpp"
  24. namespace boost
  25. {
  26. // Specialize this for user-defined types
  27. template<typename T>
  28. struct has_find
  29. : boost::mpl::or_<
  30. boost::mpl::or_<
  31. is_std_map<T>
  32. , is_std_multimap<T>
  33. , is_std_set<T>
  34. , is_std_multiset<T>
  35. >
  36. , boost::mpl::or_<
  37. is_std_hash_map<T>
  38. , is_std_hash_multimap<T>
  39. , is_std_hash_set<T>
  40. , is_std_hash_multiset<T>
  41. >
  42. , boost::mpl::or_<
  43. is_std_unordered_map<T>
  44. , is_std_unordered_multimap<T>
  45. , is_std_unordered_set<T>
  46. , is_std_unordered_multiset<T>
  47. >
  48. >
  49. {
  50. };
  51. }
  52. #endif