X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fchset.C;h=20e28319c5bb4b3b01cbb0ff5178bfb123de6015;hb=9833278ed8cd7f85dbabcfe0e2e8747c5db2db3d;hp=d0258c51e826a80cd56b9ad4706c7f4b86f033b6;hpb=dd9b8de435497ce405d5dd1615dc2dc2d3ab3e63;p=lyx.git diff --git a/src/chset.C b/src/chset.C index d0258c51e8..20e28319c5 100644 --- a/src/chset.C +++ b/src/chset.C @@ -20,7 +20,13 @@ using std::make_pair; using std::endl; using boost::regex; using boost::regex_match; + +#ifndef USE_INCLUDED_STRING using boost::smatch; +#else +using boost::cmatch; +#endif + bool CharacterSet::loadFile(string const & fname) @@ -50,10 +56,14 @@ bool CharacterSet::loadFile(string const & fname) // without the use of a keyword table. regex reg("^([12][0-9][0-9])[ \t]+\"([^ ]+)\".*"); while (getline(ifs, line)) { +#ifndef USE_INCLUDED_STRING smatch sub; - if (regex_match(line, sub, reg)) { - int const n = lyx::atoi(sub.str(1)); - string const str = sub.str(2); +#else + cmatch sub; +#endif + if (regex_match(STRCONV(line), sub, reg)) { + int const n = lyx::atoi(STRCONV(sub.str(1))); + string const str = STRCONV(sub.str(2)); if (lyxerr.debugging(Debug::KBMAP)) lyxerr << "Chardef: " << n << " to [" << str << "]" << endl;