Disable std::regex use for older gcc versions

This commit is contained in:
Jean-Francois Dockes
2021-08-13 21:38:12 +02:00
parent f91185fd53
commit ce0352eff4
4 changed files with 23 additions and 0 deletions
+7
View File
@@ -52,6 +52,7 @@ using namespace std;
namespace Rcl {
#ifndef NO_STD_REGEX
//// Fragment cleanup
// Chars we turn to spaces in the Snippets
static const string cstr_nc("\n\r\x0c\\");
@@ -65,6 +66,12 @@ static string fixfrag(const string& infrag)
{
return std::regex_replace(neutchars(infrag, cstr_nc), fixfrag_re, punctRep);
}
#else
static string fixfrag(const string& infrag)
{
return infrag;
}
#endif
// Fragment descriptor. A fragment is a text area with one or several