]> git.lyx.org Git - lyx.git/blob - src/support/regex.h
Don't disable apply button if one (or more) of vertical alignment, rotation,
[lyx.git] / src / support / regex.h
1 // -*- C++ -*-
2 /**
3  * \file regexp.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Peter Kümmel
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_REGEXP_H
13 #define LYX_REGEXP_H
14
15 #if defined(LYX_USE_TR1) && defined(LYX_USE_TR1_REGEX)
16 #  ifdef _MSC_VER
17 #    include <regex>
18 #    define match_partial _Match_partial
19 #  else
20 #    include <tr1/regex>
21 //   TODO no match_partial in gcc, how to replace?
22 #    define match_partial match_default
23 #  endif
24 #  define LR_NS std::tr1
25 #else 
26 #  include <boost/regex.hpp>
27 #  define LR_NS boost
28 #endif
29
30 namespace lyx {
31 using LR_NS::regex;
32 using LR_NS::smatch;    
33 using LR_NS::regex_replace;
34 using LR_NS::basic_regex;       
35 using LR_NS::regex_error;       
36 using LR_NS::regex_search;
37 using LR_NS::sregex_iterator;
38 using LR_NS::match_results;
39
40 namespace regex_constants
41 {
42 using namespace LR_NS::regex_constants;
43 using LR_NS::regex_constants::match_flag_type;
44 }
45
46 }
47
48 #undef LR_NS
49
50 #endif