forked from chronolaw/cpp_study
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpplang.hpp
More file actions
53 lines (40 loc) · 1.03 KB
/
cpplang.hpp
File metadata and controls
53 lines (40 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) 2020 by Chrono
#ifndef _CPP_LANG_HPP
#define _CPP_LANG_HPP
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <regex>
#include <atomic>
#include <future>
#include <thread>
//never 'using namespace std;' in c++ header
// must be C++11 or later
#if __cplusplus < 201103
# error "C++ is too old"
#endif // __cplusplus < 201103
// [[deprecated]]
#if __cplusplus >= 201402
# define CPP_DEPRECATED [[deprecated]]
#else
# define CPP_DEPRECATED [[gnu::deprecated]]
#endif // __cplusplus >= 201402
// static_assert
#if __cpp_static_assert >= 201411
# define STATIC_ASSERT(x) static_assert(x)
#else
# define STATIC_ASSERT(x) static_assert(x, #x)
#endif
// macro for convienient namespace
#define BEGIN_NAMESPACE(x) namespace x {
#define END_NAMESPACE(x) }
#define USING_NAMESPACE(x) using namespace x
//static_assert(
// __GNUC__ >= 4, "GCC is too old");
#endif //_CPP_LANG_HPP