2010-06-29 17:09:40 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file regexp.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Peter Kümmel
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LYX_REGEXP_H
|
|
|
|
#define LYX_REGEXP_H
|
|
|
|
|
2015-05-19 13:10:38 +00:00
|
|
|
#if defined(LYX_USE_CXX11) && defined(LYX_USE_STD_REGEX)
|
2014-12-23 21:18:08 +00:00
|
|
|
# include <regex>
|
2014-12-21 19:19:12 +00:00
|
|
|
// <regex> in gcc is unusable in versions less than 4.9.0
|
|
|
|
// see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
|
|
|
|
# define LR_NS std
|
2014-12-23 21:18:08 +00:00
|
|
|
#else
|
2010-06-30 11:04:30 +00:00
|
|
|
# include <boost/regex.hpp>
|
|
|
|
# define LR_NS boost
|
2015-11-24 19:31:14 +00:00
|
|
|
#endif
|
|
|
|
|
2011-03-02 21:28:36 +00:00
|
|
|
namespace lyx {
|
|
|
|
using LR_NS::regex;
|
|
|
|
using LR_NS::regex_match;
|
2015-11-22 12:02:39 +00:00
|
|
|
using LR_NS::regex_replace;
|
|
|
|
using LR_NS::regex_search;
|
2011-03-02 21:28:36 +00:00
|
|
|
using LR_NS::sregex_iterator;
|
|
|
|
using LR_NS::smatch;
|
|
|
|
using LR_NS::basic_regex;
|
|
|
|
using LR_NS::regex_error;
|
2010-06-30 11:04:30 +00:00
|
|
|
using LR_NS::match_results;
|
|
|
|
|
|
|
|
namespace regex_constants
|
2010-06-29 17:09:40 +00:00
|
|
|
{
|
2010-06-30 11:04:30 +00:00
|
|
|
using namespace LR_NS::regex_constants;
|
|
|
|
using LR_NS::regex_constants::match_flag_type;
|
2010-06-29 17:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-06-30 11:04:30 +00:00
|
|
|
#undef LR_NS
|
2010-06-29 17:09:40 +00:00
|
|
|
|
|
|
|
#endif
|