]> git.lyx.org Git - features.git/commit
Fix some thinkos in MSVC regex hack
authorGeorg Baum <baum@lyx.org>
Sun, 22 Nov 2015 12:02:39 +0000 (13:02 +0100)
committerGeorg Baum <baum@lyx.org>
Sun, 22 Nov 2015 12:02:39 +0000 (13:02 +0100)
commit08317ecc0b56a5174270ec0fe0dc87cb4dea6a8e
treee195f0ab825110b26cd339f7cb929579f3141ff7
parentfaadac9f4ab9b735c02180dcbb2664e92911bb37
Fix some thinkos in MSVC regex hack

The changed code is not used, but I tried to use a similar approach for
boost::regex, and found some problems:
- regex_replace and regex_search are implemented in the replacement, so they
  must not be used directly
- an smatch object must be given by reference (as in the called methods),
  otherwise an exception would be thrown at runtime
- the commented out regex_replace version is actually needed

This code is supposed to be deleted, but nevertheless I wanted to record here
how it had to be modified if it was actually needed.
src/support/regex.h