]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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_INTERVAL_SET_VALUE_HPP_JOFA_100924 | |
9 | #define BOOST_ICL_CONCEPT_INTERVAL_SET_VALUE_HPP_JOFA_100924 | |
10 | ||
11 | #include <boost/utility/enable_if.hpp> | |
12 | #include <boost/icl/type_traits/is_interval_container.hpp> | |
13 | #include <boost/icl/concept/interval.hpp> | |
14 | ||
15 | namespace boost{ namespace icl | |
16 | { | |
17 | ||
18 | //============================================================================== | |
19 | //= AlgoUnifiers<Set> | |
20 | //============================================================================== | |
21 | template<class Type, class Iterator> | |
22 | inline typename enable_if<is_interval_set<Type>, typename Type::codomain_type>::type | |
23 | co_value(Iterator value_) | |
24 | { | |
25 | typedef typename Type::codomain_type codomain_type; | |
26 | return icl::is_empty(*value_)? codomain_type() : (*value_).lower(); | |
27 | } | |
28 | ||
29 | }} // namespace boost icl | |
30 | ||
31 | #endif | |
32 | ||
33 |