[string_algo] replace repeated char with single instance?
Am I required to use regex_finder to replace repeated chars with a single instance? I'm trying to cleanup a string for use with filesystem::path, for example: C:\\abc///def\\ghi => C:\abc\def\ghi There may be mixed forward and back-slashes. These are from environment variables that apparently are required by our use of NutCracker to support legacy apps under windows. If I need to use regex_finder what are the benefits of the string_algo versus just using the regex library? Thanks, Jeff
On Wed, Jan 19, 2005 at 03:09:57PM -0500, Jeff Flinn wrote:
Am I required to use regex_finder to replace repeated chars with a single instance? I'm trying to cleanup a string for use with filesystem::path, for example:
C:\\abc///def\\ghi => C:\abc\def\ghi
There may be mixed forward and back-slashes. These are from environment variables that apparently are required by our use of NutCracker to support legacy apps under windows.
If I need to use regex_finder what are the benefits of the string_algo versus just using the regex library?
Actualy you can do it without regex. You need to use token_finder and find_format. <code> string strPath=find_format_all_copy( "C:\\abc\\def//ghi", token_finder(is_any_of("\\/"), token_compress_on), const_formatter("\\")); //strPath == C:\abc\def\ghi </code> Using the regex_finder is also possible, but you will not gain much more compared to using regex library directly.
Pavol Droba wrote:
On Wed, Jan 19, 2005 at 03:09:57PM -0500, Jeff Flinn wrote:
Am I required to use regex_finder to replace repeated chars with a single instance? I'm trying to cleanup a string for use with filesystem::path, for example:
C:\\abc///def\\ghi => C:\abc\def\ghi
There may be mixed forward and back-slashes. These are from environment variables that apparently are required by our use of NutCracker to support legacy apps under windows.
If I need to use regex_finder what are the benefits of the string_algo versus just using the regex library?
Actualy you can do it without regex. You need to use token_finder and find_format.
<code>
string strPath=find_format_all_copy( "C:\\abc\\def//ghi", token_finder(is_any_of("\\/"), token_compress_on), const_formatter("\\"));
//strPath == C:\abc\def\ghi
</code>
Great! I'm just having a little trouble finding my way around the library. I was stuck on looking for a replace algorithm variant to do what I needed. I need to spend an evening studying the doc's I see. One suggestion I have is to add to the Quick Reference table, the req'd header. This would help newbies(me) get up and running faster. Thanks, Jeff
On Wed, Jan 19, 2005 at 04:53:33PM -0500, Jeff Flinn wrote:
Pavol Droba wrote:
Great!
I'm just having a little trouble finding my way around the library. I was stuck on looking for a replace algorithm variant to do what I needed. I need to spend an evening studying the doc's I see.
Replace algorithm are only top of the peak. They are provided for convenience, but they are just simple forwarders to find_format facility. find_format allows you to take a finder and a formatter and combine them together to make a replace. You can combine any finder and formatter, you can even write your own.
One suggestion I have is to add to the Quick Reference table, the req'd header. This would help newbies(me) get up and running faster.
This is a good idea, thanks. Regards, Pavol
Hello, I am trying to use boost unit test framework but I am getting
the following error message (it compiled okay but linking failed):
------------------------------------------------------------------------
--------
[Session started at 2005-01-20 15:43:30 -0200.]
ZeroLink: unknown symbol '__ZTv0_n12_NSoD0Ev'
Executable “cpplib” has exited due to signal 6 (SIGABRT).
------------------------------------------------------------------------
--------
I have included the following files from Boost CVS HEAD into my project:
execution_monitor.cpp
supplied_log_formatters.cpp
test_tools.cpp
unit_test_log.cpp
unit_test_main.cpp
unit_test_monitor.cpp
unit_test_parameters.cpp
unit_test_result.cpp
unit_test_suite.cpp
Here is the test code:
#include
"Mauricio Gomes"
wrote in message news:08171267-6B0C-11D9-83D2-000A95A08D26@pensardigital.com... Hello, I am trying to use boost unit test framework but I am getting the following error message (it compiled okay but linking failed): --------------------------------------------------------------------------
[Session started at 2005-01-20 15:43:30 -0200.] ZeroLink: unknown symbol '__ZTv0_n12_NSoD0Ev'
Try to run through c++filt or something similar to demandle this symbol Gennadiy
Hi Gennadiy, thank you for your tip ! I am still on the dark though.
I've run c++filt:
c++filt _ZTv0_n12_NSoD0Ev
virtual thunk to std::basic_ostream ::~basic_ostream() Then I tried to run just this:
#include <iostream>
int main (int arc, char** argv)
{
std::cout << "test";
}
... and it failed with the same error.
However, if I remove from the project the unit test framework files, it
runs fine.
I am using libstdc++.a. I don't understand what is happening.
Why when I add the unit test framework code it doesn't find the
standard library ~basic_ostream() anymore ?
It seems these last 5 years doing only Java got me really rusty with
C++ (I'd rather work with C++ but the market forced me to go to Java).
I really appreciate your help, thanks !
Best regards,
Mauricio Gomes
Pensar Digital
phone: 55-11-4121-6287
mobile: 55-11-8319-9610
http://pensardigital.com
On Jan 20, 2005, at 4:40 PM, Gennadiy Rozental wrote: "Mauricio Gomes" ----------------------------------------------------------------------
---- [Session started at 2005-01-20 15:43:30 -0200.]
ZeroLink: unknown symbol '__ZTv0_n12_NSoD0Ev' Try to run through c++filt or something similar to demandle this symbol Gennadiy _______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
c++filt _ZTv0_n12_NSoD0Ev virtual thunk to std::basic_ostream
Then I tried to run just this: #include <iostream>
int main (int arc, char** argv) { std::cout << "test"; }
... and it failed with the same error. However, if I remove from the project the unit test framework files, it runs fine.
Hmm...
I am using libstdc++.a. I don't understand what is happening.
Why when I add the unit test framework code it doesn't find the standard
So do I. library ~basic_ostream() anymore ? Most probably looks like compiler bug
It seems these last 5 years doing only Java got me really rusty with C++ (I'd rather work with C++ but the market forced me to go to Java).
I don't think 'last 5 years doing only Java' has anything to do with this. Let's try couple more thigs: 1. Could you locate where this undefined symbol referenced from? 2. Could you build framework as a standalone library and link with it? Gennadiy
On Jan 21, 2005, at 7:24 AM, Mauricio Gomes wrote:
Hi Gennadiy, thank you for your tip ! I am still on the dark though.
I've run c++filt:
c++filt _ZTv0_n12_NSoD0Ev virtual thunk to std::basic_ostream
::~basic_ostream()
Then I tried to run just this: #include <iostream>
int main (int arc, char** argv) { std::cout << "test"; }
... and it failed with the same error. However, if I remove from the project the unit test framework files, it runs fine.
I am using libstdc++.a. I don't understand what is happening. Why when I add the unit test framework code it doesn't find the standard library ~basic_ostream() anymore ?
It seems these last 5 years doing only Java got me really rusty with C++ (I'd rather work with C++ but the market forced me to go to Java).
I really appreciate your help, thanks !
Best regards, Mauricio Gomes Pensar Digital phone: 55-11-4121-6287 mobile: 55-11-8319-9610 http://pensardigital.com
On Jan 20, 2005, at 4:40 PM, Gennadiy Rozental wrote:
"Mauricio Gomes"
wrote in message news:08171267-6B0C-11D9-83D2-000A95A08D26@pensardigital.com... Hello, I am trying to use boost unit test framework but I am getting the following error message (it compiled okay but linking failed): --------------------------------------------------------------------- -----
[Session started at 2005-01-20 15:43:30 -0200.] ZeroLink: unknown symbol '__ZTv0_n12_NSoD0Ev'
Try to run through c++filt or something similar to demandle this symbol
Gennadiy
I had problems with an ostream when I started using Xcode. Your problem sounds similar, maybe not exactly the same. IIRC, the fix was simply to turn off ZeroLink. Basically, the moral of the story was don't use ZeroLink with C++. You be interested in the archive posts. Here's my original post: http://lists.apple.com/archives/xcode-users/2004/Nov/msg00048.html
Hi Andy, Turning off ZeroLink indeed solved the problem. Thanks a lot ! Thanks for including a link to your original post too. It was very informative to read the thread. Gennadiy, I haven't answered your second email because I had to learn how to apply the solutions presented in this list to compile boost on OS X without serialization or to learn bjam to build only the unit test framework and I had no time to try either. As disabling ZeroLink would be really fast to try I could just make a quick pause on my Java day job to do it. ;) Thank you for your tip with c++filt, I did not know the tool. Mauricio Gomes Pensar Digital phone: 55-11-4121-6287 mobile: 55-11-8319-9610 http://pensardigital.com On Jan 24, 2005, at 3:32 AM, Andy Wiese wrote:
On Jan 21, 2005, at 7:24 AM, Mauricio Gomes wrote:
Hi Gennadiy, thank you for your tip ! I am still on the dark though.
I've run c++filt:
c++filt _ZTv0_n12_NSoD0Ev virtual thunk to std::basic_ostream
::~basic_ostream()
Then I tried to run just this: #include <iostream>
int main (int arc, char** argv) { std::cout << "test"; }
... and it failed with the same error. However, if I remove from the project the unit test framework files, it runs fine.
I am using libstdc++.a. I don't understand what is happening. Why when I add the unit test framework code it doesn't find the standard library ~basic_ostream() anymore ?
It seems these last 5 years doing only Java got me really rusty with C++ (I'd rather work with C++ but the market forced me to go to Java).
I really appreciate your help, thanks !
Best regards, Mauricio Gomes Pensar Digital phone: 55-11-4121-6287 mobile: 55-11-8319-9610 http://pensardigital.com
On Jan 20, 2005, at 4:40 PM, Gennadiy Rozental wrote:
"Mauricio Gomes"
wrote in message news:08171267-6B0C-11D9-83D2-000A95A08D26@pensardigital.com... Hello, I am trying to use boost unit test framework but I am getting the following error message (it compiled okay but linking failed): -------------------------------------------------------------------- ------
[Session started at 2005-01-20 15:43:30 -0200.] ZeroLink: unknown symbol '__ZTv0_n12_NSoD0Ev'
Try to run through c++filt or something similar to demandle this symbol
Gennadiy
I had problems with an ostream when I started using Xcode. Your problem sounds similar, maybe not exactly the same. IIRC, the fix was simply to turn off ZeroLink. Basically, the moral of the story was don't use ZeroLink with C++.
You be interested in the archive posts. Here's my original post:
http://lists.apple.com/archives/xcode-users/2004/Nov/msg00048.html
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Heh heh... the first time I've actually had something useful to contribute to boost-users! You made my day! On Jan 24, 2005, at 2:44 PM, Mauricio Gomes wrote:
Hi Andy,
Turning off ZeroLink indeed solved the problem. Thanks a lot ! Thanks for including a link to your original post too. It was very informative to read the thread.
Gennadiy, I haven't answered your second email because I had to learn how to apply the solutions presented in this list to compile boost on OS X without serialization or to learn bjam to build only the unit test framework and I had no time to try either. As disabling ZeroLink would be really fast to try I could just make a quick pause on my Java day job to do it. ;) Thank you for your tip with c++filt, I did not know the tool.
Mauricio Gomes Pensar Digital phone: 55-11-4121-6287 mobile: 55-11-8319-9610 http://pensardigital.com
On Jan 24, 2005, at 3:32 AM, Andy Wiese wrote:
On Jan 21, 2005, at 7:24 AM, Mauricio Gomes wrote:
Hi Gennadiy, thank you for your tip ! I am still on the dark though.
I've run c++filt:
c++filt _ZTv0_n12_NSoD0Ev virtual thunk to std::basic_ostream
::~basic_ostream()
Then I tried to run just this: #include <iostream>
int main (int arc, char** argv) { std::cout << "test"; }
... and it failed with the same error. However, if I remove from the project the unit test framework files, it runs fine.
I am using libstdc++.a. I don't understand what is happening. Why when I add the unit test framework code it doesn't find the standard library ~basic_ostream() anymore ?
It seems these last 5 years doing only Java got me really rusty with C++ (I'd rather work with C++ but the market forced me to go to Java).
I really appreciate your help, thanks !
Best regards, Mauricio Gomes Pensar Digital phone: 55-11-4121-6287 mobile: 55-11-8319-9610 http://pensardigital.com
On Jan 20, 2005, at 4:40 PM, Gennadiy Rozental wrote:
"Mauricio Gomes"
wrote in message news:08171267-6B0C-11D9-83D2-000A95A08D26@pensardigital.com... Hello, I am trying to use boost unit test framework but I am getting the following error message (it compiled okay but linking failed): ------------------------------------------------------------------- -------
[Session started at 2005-01-20 15:43:30 -0200.] ZeroLink: unknown symbol '__ZTv0_n12_NSoD0Ev'
Try to run through c++filt or something similar to demandle this symbol
Gennadiy
I had problems with an ostream when I started using Xcode. Your problem sounds similar, maybe not exactly the same. IIRC, the fix was simply to turn off ZeroLink. Basically, the moral of the story was don't use ZeroLink with C++.
You be interested in the archive posts. Here's my original post:
http://lists.apple.com/archives/xcode-users/2004/Nov/msg00048.html
_______________________________________________ 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
participants (5)
-
Andy Wiese
-
Gennadiy Rozental
-
Jeff Flinn
-
Mauricio Gomes
-
Pavol Droba