Remove CDS_RVALUE_SUPPORT, CDS_MOVE_SEMANTICS_SUPPORT macros and emulating code
[libcds.git] / cds / details / hash_functor_selector.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_DETAILS_HASH_FUNCTOR_SELECTOR_H
4 #define __CDS_DETAILS_HASH_FUNCTOR_SELECTOR_H
5
6 //@cond
7
8 #if CDS_COMPILER == CDS_COMPILER_MSVC || CDS_COMPILER == CDS_COMPILER_INTEL
9 #   include <functional>
10 #elif CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG
11     // GCC 4.3+
12 #   include <functional>
13 #else
14     // Default, use boost implementation
15 #   include <boost/tr1/functional.hpp>
16 #endif
17
18 namespace cds { namespace details {
19
20 #if CDS_COMPILER == CDS_COMPILER_MSVC || CDS_COMPILER == CDS_COMPILER_INTEL
21 #   if _MSC_VER >= 1600
22         // MSVC 2010 and above
23         using std::hash;
24 #       define CDS_BEGIN_STD_HASH_NAMESPACE namespace std {
25 #       define CDS_END_STD_HASH_NAMESPACE   }
26 #       define CDS_STD_HASH_NAMESPACE std
27 #   else
28         // MSVC 2008
29         using std::tr1::hash;
30 #       define CDS_BEGIN_STD_HASH_NAMESPACE namespace std { namespace tr1 {
31 #       define CDS_END_STD_HASH_NAMESPACE   }}
32 #       define CDS_STD_HASH_NAMESPACE std::tr1
33 #   endif
34 #elif CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG
35     // GCC 4.3+
36     using std::hash;
37 #   define CDS_BEGIN_STD_HASH_NAMESPACE namespace std {
38 #   define CDS_END_STD_HASH_NAMESPACE   }
39 #   define CDS_STD_HASH_NAMESPACE std
40 #else
41     // Default, use boost implementation
42     using std::tr1::hash;
43 #   define CDS_BEGIN_STD_HASH_NAMESPACE namespace std { namespace tr1 {
44 #   define CDS_END_STD_HASH_NAMESPACE   }}
45 #   define CDS_STD_HASH_NAMESPACE std::tr1
46 #endif
47
48 }} // namespace cds::details
49 //@endcond
50
51 #endif // __CDS_DETAILS_HASH_FUNCTOR_SELECTOR_H