libcopp 2.3.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tuple.h
Go to the documentation of this file.
1
14#ifndef STD_TUPLE_H
15#define STD_TUPLE_H
16
17#pragma once
18
19// ============================================================
20// 公共包含部分
21// 自动导入TR1库
22// ============================================================
23
36#include "utility.h"
37
38// VC9.0 SP1以上分支判断
39#if defined(_MSC_VER) && ((_MSC_VER == 1500 && defined(_HAS_TR1)) || _MSC_VER > 1500)
40// 采用VC std::tr1库
41# include <tuple>
42#elif defined(__clang__) && __clang_major__ >= 3
43// 采用Clang c++11库
44# include <tuple>
45#elif defined(__GNUC__) && __GNUC__ >= 4
46// 采用G++ std::tr1库
47# if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
48# include <tuple>
49# else
50# include <tr1/tuple>
51namespace std {
52using tr1::get;
53using tr1::ignore;
54using tr1::make_tuple;
55using tr1::tie;
56using tr1::tuple;
57using tr1::tuple_element;
58using tr1::tuple_size;
59} // namespace std
60# endif
61#else
62// 采用boost库
63# include <boost/tr1/tuple.hpp>
64namespace std {
65using tr1::get;
66using tr1::ignore;
67using tr1::make_tuple;
68using tr1::tie;
69using tr1::tuple;
70using tr1::tuple_element;
71using tr1::tuple_size;
72} // namespace std
73#endif
74
75#endif
STL namespace.
导入公共高级库 Licensed under the MIT licenses.