Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix regexes with older gcc.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Oct 2017 08:43:06 +0000 (10:43 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Oct 2017 08:43:06 +0000 (10:43 +0200)
See https://stackoverflow.com/questions/8060025/is-this-c11-regex-error-me-or-the-compiler.

src/mc/remote/RemoteClient.cpp

index d243abb..32be209 100644 (file)
@@ -111,8 +111,8 @@ static bool is_filtered_lib(const std::string& libname)
 
 static std::string get_lib_name(const std::string& pathname)
 {
 
 static std::string get_lib_name(const std::string& pathname)
 {
-  static const std::regex so_re("\\.so[.0-9]*$");
-  static const std::regex version_re("-[.0-9-]*$");
+  static const std::regex so_re("\\.so[\\.0-9]*$", std::regex_constants::basic);
+  static const std::regex version_re("-[\\.0-9-]*$", std::regex_constants::basic);
   std::string map_basename = simgrid::xbt::Path(pathname).getBasename();
   std::string libname;
 
   std::string map_basename = simgrid::xbt::Path(pathname).getBasename();
   std::string libname;