Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
300e5f1
)
std::regex does not work properly with gcc 4.8
author
vsr
<vsr@opencascade.com>
Tue, 26 Oct 2021 17:10:54 +0000
(20:10 +0300)
committer
vsr
<vsr@opencascade.com>
Tue, 26 Oct 2021 17:10:54 +0000
(20:10 +0300)
src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx
patch
|
blob
|
history
diff --git
a/src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx
b/src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx
index ec06d988548ae0d1a1a1010a6e161dda1fc55e62..b058e86a2d607bc6bc66d0d5734873d94b622d39 100644
(file)
--- a/
src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx
+++ b/
src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx
@@
-29,10
+29,10
@@
#include <Basics_DirUtils.hxx>
#include <Basics_Utils.hxx>
#include <Basics_DirUtils.hxx>
#include <Basics_Utils.hxx>
-#include <regex>
#include <cstdlib> // getenv, system
#include <boost/filesystem.hpp>
#include <cstdlib> // getenv, system
#include <boost/filesystem.hpp>
+#include <boost/regex.hpp>
namespace boofs = boost::filesystem;
#ifdef WIN32
namespace boofs = boost::filesystem;
#ifdef WIN32
@@
-203,12
+203,12
@@
namespace
{
{// round1
enum { SCHEME = 2, AUTHORITY = 4, PATH = 5 }; // sub-strings
{
{// round1
enum { SCHEME = 2, AUTHORITY = 4, PATH = 5 }; // sub-strings
-
std
::regex urlRegex ( R"(^(([^:\/?#]+):)?(//([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?)",
-
std
::regex::extended );
-
std
::smatch matchResult;
+
boost
::regex urlRegex ( R"(^(([^:\/?#]+):)?(//([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?)",
+
boost
::regex::extended );
+
boost
::smatch matchResult;
libraryFile._isURL = false;
libraryFile._isURL = false;
- if (
std
::regex_match( libraryFile._name, matchResult, urlRegex ))
+ if (
boost
::regex_match( libraryFile._name, matchResult, urlRegex ))
libraryFile._isURL = ( !matchResult.str( SCHEME ).empty() &&
!matchResult.str( AUTHORITY ).empty() &&
!matchResult.str( PATH ).empty() );
libraryFile._isURL = ( !matchResult.str( SCHEME ).empty() &&
!matchResult.str( AUTHORITY ).empty() &&
!matchResult.str( PATH ).empty() );
@@
-217,12
+217,12
@@
namespace
return true;
{// round2
enum { HOST = 2, PORT = 3, PATH = 4 }; // sub-strings
return true;
{// round2
enum { HOST = 2, PORT = 3, PATH = 4 }; // sub-strings
-
std
::regex urlRegex ( R"(^(([^:\/?#]+):)?([^/]+)?(/[^#]*))",
-
std
::regex::extended );
-
std
::smatch matchResult;
+
boost
::regex urlRegex ( R"(^(([^:\/?#]+):)?([^/]+)?(/[^#]*))",
+
boost
::regex::extended );
+
boost
::smatch matchResult;
libraryFile._isURL = false;
libraryFile._isURL = false;
- if (
std
::regex_match( libraryFile._name, matchResult, urlRegex ))
+ if (
boost
::regex_match( libraryFile._name, matchResult, urlRegex ))
libraryFile._isURL = ( !matchResult.str( HOST ).empty() &&
!matchResult.str( PORT ).empty() &&
!matchResult.str( PATH ).empty() );
libraryFile._isURL = ( !matchResult.str( HOST ).empty() &&
!matchResult.str( PORT ).empty() &&
!matchResult.str( PATH ).empty() );