annotate DEPENDENCIES/generic/include/boost/icl/concept/interval_set_value.hpp @ 133:4acb5d8d80b6
tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author |
Chris Cannam |
date |
Tue, 30 Jul 2019 12:25:44 +0100 |
parents |
2665513ce2d3 |
children |
|
rev |
line source |
Chris@16
|
1 /*-----------------------------------------------------------------------------+
|
Chris@16
|
2 Copyright (c) 2010-2010: Joachim Faulhaber
|
Chris@16
|
3 +------------------------------------------------------------------------------+
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
5 (See accompanying file LICENCE.txt or copy at
|
Chris@16
|
6 http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
7 +-----------------------------------------------------------------------------*/
|
Chris@16
|
8 #ifndef BOOST_ICL_CONCEPT_INTERVAL_SET_VALUE_HPP_JOFA_100924
|
Chris@16
|
9 #define BOOST_ICL_CONCEPT_INTERVAL_SET_VALUE_HPP_JOFA_100924
|
Chris@16
|
10
|
Chris@16
|
11 #include <boost/utility/enable_if.hpp>
|
Chris@16
|
12 #include <boost/icl/type_traits/is_interval_container.hpp>
|
Chris@16
|
13 #include <boost/icl/concept/interval.hpp>
|
Chris@16
|
14
|
Chris@16
|
15 namespace boost{ namespace icl
|
Chris@16
|
16 {
|
Chris@16
|
17
|
Chris@16
|
18 //==============================================================================
|
Chris@16
|
19 //= AlgoUnifiers<Set>
|
Chris@16
|
20 //==============================================================================
|
Chris@16
|
21 template<class Type, class Iterator>
|
Chris@16
|
22 inline typename enable_if<is_interval_set<Type>, typename Type::codomain_type>::type
|
Chris@16
|
23 co_value(Iterator value_)
|
Chris@16
|
24 {
|
Chris@16
|
25 typedef typename Type::codomain_type codomain_type;
|
Chris@16
|
26 return icl::is_empty(*value_)? codomain_type() : (*value_).lower();
|
Chris@16
|
27 }
|
Chris@16
|
28
|
Chris@16
|
29 }} // namespace boost icl
|
Chris@16
|
30
|
Chris@16
|
31 #endif
|
Chris@16
|
32
|
Chris@16
|
33
|