-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRegexDefs.h
51 lines (41 loc) · 1.25 KB
/
RegexDefs.h
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
//---------------------------------------------------------------------------
#ifndef RegexDefsH
#define RegexDefsH
#include <string>
//#define USE_STD_REGEX
#if !defined( USE_STD_REGEX )
#include <boost/regex.hpp>
#else
#include <regex>
#endif
#if !defined( USE_STD_REGEX )
using regex_type_a = boost::regex;
using regex_cmatch_type_a = boost::cmatch;
using regex_smatch_type_a = boost::smatch;
#else
using regex_type_a = std::regex;
using regex_cmatch_type_a = std::cmatch;
using regex_smatch_type_a = std::smatch;
#endif
#if !defined( USE_STD_REGEX )
using regex_type_w = boost::wregex;
using regex_cmatch_type_w = boost::wcmatch;
using regex_smatch_type_w = boost::wsmatch;
#else
using regex_type_w = std::wregex;
using regex_cmatch_type_w = std::wcmatch;
using regex_smatch_type_w = std::wsmatch;
#endif
#if !defined(_UNICODE)
using regex_type = regex_type_a;
using regex_cmatch_type = regex_cmatch_type_a;
using regex_smatch_type = regex_smatch_type_a;
using std_string = std::string;
#else
using regex_type = regex_type_w;
using regex_cmatch_type = regex_cmatch_type_w;
using regex_smatch_type = regex_smatch_type_w;
using std_string = std::wstring;
#endif
//---------------------------------------------------------------------------
#endif