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_JOINABLE_HPP_JOFA_100920
9 #define BOOST_ICL_CONCEPT_JOINABLE_HPP_JOFA_100920
11 #include <boost/icl/type_traits/is_interval_container.hpp>
12 #include <boost/icl/concept/interval.hpp>
14 namespace boost{ namespace icl
20 typename enable_if<is_interval_set<Type>, bool>::type
21 is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0)
23 return touches(*it_, *next_);
27 typename enable_if<is_interval_map<Type>, bool>::type
28 is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0)
30 return touches((*it_).first, (*next_).first)
31 && (*it_).second == (*next_).second ;
37 }} // namespace boost icl