upgrade from boost 1.39 to boost 1.50. Issue with regex_match
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
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
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
On 10/20/2016 10:50 AM, MAURICE Jean wrote:
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
On 19/10/2016 13:41, MAURICE Jean wrote:
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 …
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.
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-bounces@lists.boost.org] De la part de John Maddock Envoyé : jeudi 20 octobre 2016 11:13 À : boost-users@lists.boost.org Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match On 19/10/2016 13:41, MAURICE Jean wrote:
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 .
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 Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 20/10/2016 10:17, MAURICE Jean wrote:
Hi John,
The first thing I would like to know is :
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.
If yes, what does it mean ?
TIA Jean
-----Message d'origine----- De : Boost-users [mailto:boost-users-bounces@lists.boost.org] De la part de John Maddock Envoyé : jeudi 20 octobre 2016 11:13 À : boost-users@lists.boost.org Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match
On 19/10/2016 13:41, MAURICE Jean wrote:
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 .
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 Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
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-bounces@lists.boost.org] De la part de John Maddock Envoyé : jeudi 20 octobre 2016 11:45 À : boost-users@lists.boost.org Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match On 20/10/2016 10:17, MAURICE Jean wrote:
Hi John,
The first thing I would like to know is :
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.
If yes, what does it mean ?
TIA Jean
On 20/10/2016 11:00, MAURICE Jean wrote:
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...
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-bounces@lists.boost.org] De la part de John Maddock Envoyé : jeudi 20 octobre 2016 11:45 À : boost-users@lists.boost.org Objet : Re: [Boost-users] upgrade from boost 1.39 to boost 1.50. Issue with regex_match
On 20/10/2016 10:17, MAURICE Jean wrote:
Hi John,
The first thing I would like to know is :
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.
If yes, what does it mean ?
TIA Jean
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
childNode.infoNode.rFullPathFilePattern.m_pimpl.px->m_expression
error C2248: 'boost::basic_regex
participants (4)
-
Andreas Wehrmann
-
degski
-
John Maddock
-
MAURICE Jean