Ejemplo n.º 1
0
inline bool is_mergeable (const range<iter1_t> &src1,
                          const range<iter2_t> &src2, compare  comp )
{   //---------------------------- begin ------------------------------------
    typedef typename iterator_traits<iter1_t>::value_type type1 ;
    typedef typename iterator_traits<iter2_t>::value_type type2 ;

    static_assert ( std::is_same<type1, type2>::value,
                    "Incompatible iterators\n");
    //---------------------------- begin --------------------------------------
    return comp ( *(src2.front()), *(src1.back()));
};
Ejemplo n.º 2
0
		inline type::bool_t intersects(range<entity<Segments ... >> const & one, range<entity<Segments ... >> const & two) noexcept
		{
			return (one.front() <= two.back()) && (two.front() <= one.back());
		}