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_SET_VALUE_HPP_JOFA_100924
9 #define BOOST_ICL_CONCEPT_SET_VALUE_HPP_JOFA_100924
11 #include <boost/icl/type_traits/is_set.hpp>
12 #include <boost/icl/type_traits/codomain_type_of.hpp>
14 namespace boost{ namespace icl
17 //==============================================================================
19 //==============================================================================
20 template<class Type, class Iterator>
21 inline typename enable_if<is_set<Type>, const typename Type::key_type>::type&
22 key_value(Iterator it_)
28 inline typename enable_if<is_set<Type>, typename Type::value_type>::type
29 make_value(const typename Type::key_type& key_val,
30 const typename codomain_type_of<Type>::type& )
32 return typename Type::value_type(key_val);
36 }} // namespace boost icl