element_set_value.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. /*-----------------------------------------------------------------------------+
  2. Copyright (c) 2010-2010: Joachim Faulhaber
  3. +------------------------------------------------------------------------------+
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENCE.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. +-----------------------------------------------------------------------------*/
  8. #ifndef BOOST_ICL_CONCEPT_ELEMENT_SET_VALUE_HPP_JOFA_100924
  9. #define BOOST_ICL_CONCEPT_ELEMENT_SET_VALUE_HPP_JOFA_100924
  10. #include <boost/icl/type_traits/is_element_container.hpp>
  11. namespace boost{ namespace icl
  12. {
  13. //==============================================================================
  14. //= AlgoUnifiers<Set>
  15. //==============================================================================
  16. template<class Type, class Iterator>
  17. inline typename enable_if<is_element_set<Type>, const typename Type::key_type>::type&
  18. co_value(Iterator it_)
  19. {
  20. return *it_;
  21. }
  22. }} // namespace boost icl
  23. #endif