libcopp  1.1.0
utility.h
Go to the documentation of this file.
1 
14 #ifndef STD_UTILITY_H
15 #define STD_UTILITY_H
16 
17 
18 #pragma once
19 
20 // ============================================================
21 // 公共包含部分
22 // 自动导入TR1库
23 // ============================================================
24 
36 // VC9.0 SP1以上分支判断
37 #if defined(_MSC_VER) && ((_MSC_VER == 1500 && defined(_HAS_TR1)) || _MSC_VER > 1500)
38 // 采用VC std::tr1库
39 #include <utility>
40 #elif defined(__clang__) && __clang_major__ >= 3
41 // 采用Clang c++11库
42 #include <utility>
43 #elif defined(__GNUC__) && __GNUC__ >= 4
44 // 采用G++ std::tr1库
45 #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
46 #include <utility>
47 #else
48 #include <tr1/utility>
49 namespace std {
50  using tr1::get;
51  using tr1::tuple_element;
52  using tr1::tuple_size;
53 }
54 #endif
55 #else
56 // 采用boost库
57 #include <boost/tr1/utility.hpp>
58 namespace std {
59  using tr1::get;
60  using tr1::tuple_element;
61  using tr1::tuple_size;
62 }
63 #endif
64 
65 #endif
STL namespace.
Tc * get()
get current coroutine and try to convert type