Crypto++  7.0
Free C++ class library of cryptographic schemes
stdcpp.h
Go to the documentation of this file.
1 // stdcpp.h - originally written and placed in the public domain by Wei Dai
2 
3 /// \file stdcpp.h
4 /// \brief Common C++ header files
5 
6 #ifndef CRYPTOPP_STDCPP_H
7 #define CRYPTOPP_STDCPP_H
8 
9 #if _MSC_VER >= 1500
10 #define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY
11 #include <intrin.h>
12 #endif
13 
14 #include <string>
15 #include <memory>
16 #include <exception>
17 #include <typeinfo>
18 #include <algorithm>
19 #include <functional>
20 #include <utility>
21 #include <vector>
22 #include <limits>
23 #include <deque>
24 #include <list>
25 #include <map>
26 #include <new>
27 
28 // http://connect.microsoft.com/VisualStudio/feedback/details/1600701/type-info-does-not-compile-with-has-exceptions-0
29 #if defined(_MSC_VER) && (_MSC_VER < 1900) && defined(_HAS_EXCEPTIONS) && (_HAS_EXCEPTIONS == 0)
30 namespace std {
31  using ::type_info;
32 }
33 #endif
34 
35 // make_unchecked_array_iterator
36 #if _MSC_VER >= 1600
37 #include <iterator>
38 #endif
39 
40 #if defined(CRYPTOPP_CXX11_ATOMICS)
41 #include <atomic>
42 #endif
43 
44 #if defined(CRYPTOPP_CXX11_SYNCHRONIZATION)
45 #include <mutex>
46 #endif
47 
48 #if defined(CRYPTOPP_CXX11_RVALUES)
49 # include <utility>
50 #endif
51 
52 #include <cstdlib>
53 #include <cstddef>
54 #include <cstring>
55 #include <climits>
56 #include <cmath>
57 
58 // uintptr_t and ptrdiff_t
59 #if (__cplusplus < 201103L) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
60 # include <stdint.h>
61 #elif defined(_MSC_VER) && (_MSC_VER < 1700)
62 # include <stddef.h>
63 #endif
64 
65 // workaround needed on Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
66 #ifdef CRYPTOPP_INCLUDE_VECTOR_CC
67 # include <vector.cc>
68 #endif
69 
70 // C++Builder's standard library (Dinkumware) do not have C's global log() function
71 // https://github.com/weidai11/cryptopp/issues/520
72 #ifdef __BORLANDC__
73 using std::log;
74 #endif
75 
76 #endif