Menu

[e1f16e]: / iterator_range.hpp  Maximize  Restore  History

Download this file

34 lines (25 with data), 593 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef _ITERATOR_RANGE_HPP_
#define _ITERATOR_RANGE_HPP_
#include <boost/range/iterator_range.hpp>
#include <boost/functional/hash/hash.hpp>
namespace boost {
template <class T>
std::size_t hash_value(boost::iterator_range<T> const& arg) {
return boost::hash_range(arg.begin(), arg.end());
}
}
namespace chilon {
template <class T>
T end(T it) {
while (*it != 0) ++it;
return it;
}
template <class T1, class T2>
struct Equal {
bool operator()(T1 const& t1, T2 const& t2) const {
return t1 == t2;
}
};
using boost::iterator_range;
}
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.