1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright 2005 Daniel Wallin.
3 // Copyright 2005 Joel de Guzman.
4 // Copyright 2015 John Fletcher
5 //
6 // Use, modification and distribution is subject to the Boost Software
7 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //
10 // This is based on is_std_hash_map.hpp which was
11 // modeled after range_ex, Copyright 2004 Eric Niebler
12 ///////////////////////////////////////////////////////////////////////////////
13 //
14 // is_unordered_set_or_map.hpp
15 //
16 /////////////////////////////////////////////////////////////////////////////
17 
18 // Definitions of overloads for the use of find with unordered types.
19 
20 #ifndef BOOST_PHOENIX_IS_STD_UNORDERED_SET_OR_MAP
21 #define BOOST_PHOENIX_IS_STD_UNORDERED_SET_OR_MAP
22 
23 #include <boost/phoenix/config.hpp>
24 #include <boost/mpl/bool.hpp>
25 
26 #ifdef BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
27 #include BOOST_PHOENIX_UNORDERED_SET_HEADER
28 #include BOOST_PHOENIX_UNORDERED_MAP_HEADER
29 #endif
30 
31 namespace boost
32 {
33     template<class T>
34     struct is_std_unordered_set
35         : boost::mpl::false_
36     {};
37 
38     template<class T>
39     struct is_std_unordered_multiset
40         : boost::mpl::false_
41     {};
42 
43     template<class T>
44     struct is_std_unordered_map
45         : boost::mpl::false_
46     {};
47 
48     template<class T>
49     struct is_std_unordered_multimap
50         : boost::mpl::false_
51     {};
52 
53 #ifdef BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
54 
55     template<
56         class Kty
57       , class Hash
58       , class Cmp
59       , class Alloc
60     >
61     struct is_std_unordered_set< std::unordered_set<Kty,Hash,Cmp,Alloc> >
62         : boost::mpl::true_
63     {};
64 
65     template<
66         class Kty
67       , class Hash
68       , class Cmp
69       , class Alloc
70     >
71     struct is_std_unordered_multiset< std::unordered_multiset<Kty,Hash,Cmp,Alloc> >
72         : boost::mpl::true_
73     {};
74 
75     template<
76         class Kty
77       , class Ty
78       , class Hash
79       , class Cmp
80       , class Alloc
81     >
82     struct is_std_unordered_map< std::unordered_map<Kty,Ty,Hash,Cmp,Alloc> >
83         : boost::mpl::true_
84     {};
85 
86     template<
87         class Kty
88       , class Ty
89       , class Hash
90       , class Cmp
91       , class Alloc
92     >
93     struct is_std_unordered_multimap< std::unordered_multimap<Kty,Ty,Hash,Cmp,Alloc> >
94         : boost::mpl::true_
95     {};
96 
97 #endif
98 } // namespace boost
99 
100 #endif
101