libcopp 2.3.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ref.h
Go to the documentation of this file.
1
14#ifndef STD_REF_H
15#define STD_REF_H
16
17#pragma once
18
19// ============================================================
20// 公共包含部分
21// 自动导入引用包装库
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 <functional>
39#elif defined(__clang__) && __clang_major__ >= 3
40// 采用Clang c++11库
41# include <functional>
42#elif defined(__GNUC__) && __GNUC__ >= 4
43// 采用G++ std::tr1库
44# if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
45# include <functional>
46# else
47# include <tr1/functional>
48namespace std {
49using tr1::cref;
50using tr1::ref;
51using tr1::reference_wrapper;
52} // namespace std
53# endif
54#else
55// 采用boost tr1库
56# include <boost/tr1/functional.hpp>
57namespace std {
58using tr1::cref;
59using tr1::ref;
60using tr1::reference_wrapper;
61} // namespace std
62#endif
63
64#endif
STL namespace.