Line | |
---|
1 | // (C) Copyright Daniel James 2005.
|
---|
2 | // Use, modification and distribution are subject to the
|
---|
3 | // Boost Software License, Version 1.0. (See accompanying file
|
---|
4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
---|
5 | //
|
---|
6 | // Based on Peter Dimov's proposal
|
---|
7 | // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
|
---|
8 | // issue 6.18.
|
---|
9 |
|
---|
10 | #if !defined(BOOST_FUNCTIONAL_HASH_DEQUE_HPP)
|
---|
11 | #define BOOST_FUNCTIONAL_HASH_DEQUE_HPP
|
---|
12 |
|
---|
13 | #if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
---|
14 | # pragma once
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | #include <boost/config.hpp>
|
---|
18 | #include <deque>
|
---|
19 | #include <boost/functional/hash/hash.hpp>
|
---|
20 |
|
---|
21 | namespace boost
|
---|
22 | {
|
---|
23 | template <class T, class A>
|
---|
24 | std::size_t hash_value(std::deque<T, A> const& v)
|
---|
25 | {
|
---|
26 | return hash_range(v.begin(), v.end());
|
---|
27 | }
|
---|
28 |
|
---|
29 | #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
---|
30 | namespace hash_detail
|
---|
31 | {
|
---|
32 | template <class T, class A>
|
---|
33 | struct call_hash<std::deque<T, A> >
|
---|
34 | {
|
---|
35 | static std::size_t call(std::deque<T, A> const& val)
|
---|
36 | {
|
---|
37 | return boost::hash_value(val);
|
---|
38 | }
|
---|
39 | };
|
---|
40 | }
|
---|
41 | #endif
|
---|
42 | }
|
---|
43 |
|
---|
44 | #endif
|
---|
45 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.