1 
2 #pragma once
3 
4 #define _CRT_SECURE_NO_WARNINGS
5 #undef __STRICT_ANSI__
6 
7 #if defined(__clang__)
8 #if __has_feature(cxx_exceptions)
9 #define ARMIPS_EXCEPTIONS 1
10 #else
11 #define ARMIPS_EXCEPTIONS 0
12 #endif
13 #elif defined(_MSC_VER) && defined(_CPPUNWIND)
14 #define ARMIPS_EXCEPTIONS 1
15 #elif defined(__EXCEPTIONS) || defined(__cpp_exceptions)
16 #define ARMIPS_EXCEPTIONS 1
17 #else
18 #define ARMIPS_EXCEPTIONS 0
19 #endif
20 
21 #include <cstdio>
22 #include <vector>
23 #include <cstdlib>
24 #include <cstdarg>
25 #include <cctype>
26 #include <cstring>
27 #include <cmath>
28 #include <clocale>
29 
30 #include <sstream>
31 #include <iomanip>
32 #include <memory>
33 
34 #include "ext/tinyformat/tinyformat.h"
35 #define formatString tfm::format
36 
37 // Custom make_unique so that C++14 support will not be necessary for compilation
38 template<typename T, typename... Args>
make_unique(Args &&...args)39 std::unique_ptr<T> make_unique(Args&&... args)
40 {
41     return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
42 }
43