has_key_impl.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED
  2. #define BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED
  3. // Copyright Aleksey Gurtovoy 2003-2004
  4. // Copyright David Abrahams 2003-2004
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // See http://www.boost.org/libs/mpl for documentation.
  11. // $Id$
  12. // $Date$
  13. // $Revision$
  14. #include <boost/mpl/has_key_fwd.hpp>
  15. #include <boost/mpl/map/aux_/tag.hpp>
  16. #include <boost/mpl/map/aux_/at_impl.hpp>
  17. #include <boost/mpl/void.hpp>
  18. #include <boost/mpl/aux_/config/typeof.hpp>
  19. namespace boost { namespace mpl {
  20. template<>
  21. struct has_key_impl< aux::map_tag >
  22. {
  23. template< typename Map, typename Key > struct apply
  24. #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
  25. : is_not_void_<
  26. typename at_impl<aux::map_tag>
  27. ::apply<Map,Key>::type
  28. >
  29. #else
  30. : bool_< ( x_order_impl<Map,Key>::value > 1 ) >
  31. #endif
  32. {
  33. };
  34. };
  35. }}
  36. #endif // BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED