Discussion:
[Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match
MAURICE Jean
2016-10-19 12:41:14 UTC
Permalink
Hi,

I am 'upgrading' a huge C++ app from VS2005 (32bits) to VS2010 (64 bits) and boost 1.39 to boost 1.50. This app runs both under Windows and Linux.

In a function that searchs subdirectories and files of a given directory, we get the list of all the elements and then this list is filtered by :
if(true==boost::regex_match(sAdaptation, what, childNode.infoNode.rFullPathFilePattern))

sAdaptation is ".\TEST\un_noeud" (this subdirectory exists)

childNode.infoNode.rFullPathFilePattern is something like {m_pimpl={...}}

And regex_match always returns false.

If you can give me information about what is happening ...

Jean
degski
2016-10-19 13:08:36 UTC
Permalink
...and boost 1.39 to boost 1.50.
I have to ask you this question (just to keep sane), why are you
"updating" boost from 1.39 to 1.50, given that the current version is 1.62?

degski
MAURICE Jean
2016-10-19 13:12:49 UTC
Permalink
I have to ask you this question (just to keep sane), why are you "updating" boost from 1.39 to 1.50, given that the current version is 1.62?
Degski

Because a ‘big chief’ gave this order 
 I am not able to give you a technical reason to that 
 ☹

Jean
MAURICE Jean
2016-10-20 08:50:23 UTC
Permalink
I have to ask you this question (just to keep sane), why are you "updating" boost from 1.39 to 1.50, given that the >current version is 1.62?
degski
Hi, in fact there is a ‘technical reason’ : my client is a huge company. They have built their own Linux distribution based on REDHAT with standard and private tools added. Among these tools, there is boost 1.50.

Jean
Andreas Wehrmann
2016-10-21 07:13:44 UTC
Permalink
I have to ask you this question (just to keep sane), why are you "updating" boost from 1.39 to 1.50, given that the >current version is 1.62?
degski
Hi, in fact there is a ‘technical reason’ : my client is a huge company. They have built their own Linux distribution based on REDHAT with standard and private tools added. Among these tools, there is boost 1.50.
Jean
Hello,

I just wanted to hook in here.
Even though their distribution ships boost 1.50 doesn't mean you cannot
deliver your own version of boost.
In fact I have built third-party packages that do exactly that (on
Ubuntu though).

For me this seems to be a matter of how your project is setup.

Regards

John Maddock
2016-10-20 09:13:19 UTC
Permalink
Hi,
I am ‘upgrading’ a huge C++ app from VS2005 (32bits) to VS2010 (64
bits) and boost 1.39 to boost 1.50. This app runs both under Windows
and Linux.
In a function that searchs subdirectories and files of a given
directory, we get the list of all the elements and then this list is
if(true==boost::regex_match(sAdaptation, what,
childNode.infoNode.rFullPathFilePattern))
*sAdaptation*is “.\TEST\un_noeud” (this subdirectory exists)
childNode.infoNode.rFullPathFilePattern is something like *{m_pimpl={…}}*
And regex_match always returns false.
If you can give me information about what is happening …
I don't see anything in the changelog that would indicate an issue
there, and those releases are so far back my memory certainly won't help!

So you will need to provide a test case - or at least a pattern and
string for which regex_match fails for us to help further.

John.
MAURICE Jean
2016-10-20 09:17:41 UTC
Permalink
Hi John,

The first thing I would like to know is :

Is "{m_pimpl={.}}" a correct regular expression ?
If yes, what does it mean ?

TIA
Jean

-----Message d'origine-----
De : Boost-users [mailto:boost-users-***@lists.boost.org] De la part de John Maddock
Envoyé : jeudi 20 octobre 2016 11:13
À : boost-***@lists.boost.org
Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match
Post by MAURICE Jean
Hi,
I am 'upgrading' a huge C++ app from VS2005 (32bits) to VS2010 (64
bits) and boost 1.39 to boost 1.50. This app runs both under Windows
and Linux.
In a function that searchs subdirectories and files of a given
directory, we get the list of all the elements and then this list is
if(true==boost::regex_match(sAdaptation, what,
childNode.infoNode.rFullPathFilePattern))
*sAdaptation*is ".\TEST\un_noeud" (this subdirectory exists)
childNode.infoNode.rFullPathFilePattern is something like
*{m_pimpl={.}}*
And regex_match always returns false.
If you can give me information about what is happening .
I don't see anything in the changelog that would indicate an issue there, and those releases are so far back my memory certainly won't help!

So you will need to provide a test case - or at least a pattern and string for which regex_match fails for us to help further.

John.
John Maddock
2016-10-20 09:44:43 UTC
Permalink
Post by MAURICE Jean
Hi John,
Is "{m_pimpl={.}}" a correct regular expression ?
No, it's just a view of the internals of something (the regex object?)

You would need to call basic_regex::str() to get the actual stored
regular expression, or else just stream the regex object to cout.
Post by MAURICE Jean
If yes, what does it mean ?
TIA
Jean
-----Message d'origine-----
Envoyé : jeudi 20 octobre 2016 11:13
Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match
Post by MAURICE Jean
Hi,
I am 'upgrading' a huge C++ app from VS2005 (32bits) to VS2010 (64
bits) and boost 1.39 to boost 1.50. This app runs both under Windows
and Linux.
In a function that searchs subdirectories and files of a given
directory, we get the list of all the elements and then this list is
if(true==boost::regex_match(sAdaptation, what,
childNode.infoNode.rFullPathFilePattern))
*sAdaptation*is ".\TEST\un_noeud" (this subdirectory exists)
childNode.infoNode.rFullPathFilePattern is something like
*{m_pimpl={.}}*
And regex_match always returns false.
If you can give me information about what is happening .
I don't see anything in the changelog that would indicate an issue there, and those releases are so far back my memory certainly won't help!
So you will need to provide a test case - or at least a pattern and string for which regex_match fails for us to help further.
John.
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
MAURICE Jean
2016-10-20 10:00:51 UTC
Permalink
So ...
I spent a long time to step into the app with the debugger. The string "{m_pimpl={...}}" is what the debugger shows in childNode.infoNode.rFullPathFilePattern.

And childNode.infoNode.rFullPathFilePattern is the third parameter of
if(true==boost::regex_match(sAdaptation, what, childNode.infoNode.rFullPathFilePattern))

it cannot return true : right ? (in fact it is what happens)

TIA
Jean


-----Message d'origine-----
De : Boost-users [mailto:boost-users-***@lists.boost.org] De la part de John Maddock
Envoyé : jeudi 20 octobre 2016 11:45
À : boost-***@lists.boost.org
Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match
Post by MAURICE Jean
Hi John,
Is "{m_pimpl={.}}" a correct regular expression ?
No, it's just a view of the internals of something (the regex object?)

You would need to call basic_regex::str() to get the actual stored regular expression, or else just stream the regex object to cout.
Post by MAURICE Jean
If yes, what does it mean ?
TIA
Jean
John Maddock
2016-10-20 10:37:03 UTC
Permalink
Post by MAURICE Jean
So ...
I spent a long time to step into the app with the debugger. The string "{m_pimpl={...}}" is what the debugger shows in childNode.infoNode.rFullPathFilePattern.
I don't believe that's a string, m_pimpl is just the name of the single
variable in the regex object that points to it's internal data, but I
repeat: *you cannot easily see the stored regular expression in the
debugger*, you will need to call the str() member function or else
stream to cout or clog or something to extract that information.

I'll need the contents of the string that you are trying to match
against as well to explain why no match occurs.

John.

Ok, update, you might be able to get to the stored expression via:

childNode.infoNode.rFullPathFilePattern.m_pimpl.px->m_expression

or maybe not...
Post by MAURICE Jean
And childNode.infoNode.rFullPathFilePattern is the third parameter of
if(true==boost::regex_match(sAdaptation, what, childNode.infoNode.rFullPathFilePattern))
it cannot return true : right ? (in fact it is what happens)
TIA
Jean
-----Message d'origine-----
Envoyé : jeudi 20 octobre 2016 11:45
Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match
Post by MAURICE Jean
Hi John,
Is "{m_pimpl={.}}" a correct regular expression ?
No, it's just a view of the internals of something (the regex object?)
You would need to call basic_regex::str() to get the actual stored regular expression, or else just stream the regex object to cout.
Post by MAURICE Jean
If yes, what does it mean ?
TIA
Jean
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
MAURICE Jean
2016-10-20 10:55:16 UTC
Permalink
Post by John Maddock
childNode.infoNode.rFullPathFilePattern.m_pimpl.px->m_expression
error C2248: 'boost::basic_regex<charT,traits>::m_pimpl' : cannot access private member declared in class boost::basic_regex<charT,traits>'
error C2248: 'boost::shared_ptr<T>::px' : cannot access private member declared in class 'boost::shared_ptr<T>' !!

but the error gives me an information I didn't understand first m_pimpl is a 'variable' and not the 'final' string. I go back to the debugger ....

Thanks for your help
Jean
Loading...