]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/icl/include/boost/icl/concept/set_value.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / icl / include / boost / icl / concept / set_value.hpp
CommitLineData
7c673cae
FG
1/*-----------------------------------------------------------------------------+
2Copyright (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
10
11#include <boost/icl/type_traits/is_set.hpp>
12#include <boost/icl/type_traits/codomain_type_of.hpp>
13
14namespace boost{ namespace icl
15{
16
17//==============================================================================
18//= AlgoUnifiers<Set>
19//==============================================================================
20template<class Type, class Iterator>
21inline typename enable_if<is_set<Type>, const typename Type::key_type>::type&
22key_value(Iterator it_)
23{
24 return *it_;
25}
26
27template<class Type>
28inline typename enable_if<is_set<Type>, typename Type::value_type>::type
29make_value(const typename Type::key_type& key_val,
30 const typename codomain_type_of<Type>::type& )
31{
32 return typename Type::value_type(key_val);
33}
34
35
36}} // namespace boost icl
37
38#endif
39
40