Actually, I believe std::ispunct is a better
implementation than the current one
that uses "using". Just so I understand, did this
change work? If so, it
should be suggested as a change to the library.
I don't think so. I think that we must understand what
going on because
the piece of code below works neither with std:: and
namespace (on MSVC6)!
#include<iostream>
#include
#include<string>
using namespace std;
using namespace boost;
int main(int, char**){
string s = "c:\\temp\\toto\\|a<x>fdl\\|*.doc";
//"This| is, a\\| $|test";
//////////////////////////////////////////////////////////////////////
only works with "using namespace std"
typedef tokenizer
token_type;
token_type tok(s, escaped_list_separator<char>('$',
'|', '\"'));
for(token_type::iterator beg=tok.begin();
beg!=tok.end();++beg){
cout << *beg << "\n";
}
// (the code above is a test and I does not
understand what it does
// but it does not matter for what we are looking
for!)
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
only works with "std:: operator"
typedef tokenizer
token_type;
token_type tok(s,
char_delimiters_separator<char>(false, 0, "|"));
for(token_type::iterator beg=tok.begin();
beg!=tok.end();++beg){
cout << *beg << "\n";
}
//////////////////////////////////////////////////////////////////////
return 0;
}
I don't understand what you are trying to do here or
what this has to do with
regex/tokenizer?
I readed that boost turns _STD:: into std:: with
macro, so I try the same in
my small test program just trying to see if using
namespace directive inside
a brace's bloc is supported by the MSVC compiler.
Alex
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr