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