|
Boost : |
From: Frank Perbet (frank.perbet_at_[hidden])
Date: 2001-10-16 10:15:43
John Maddock wrote:
>
> >When I compile a basic example using the regex library, CC doesn't find
> the class c_regex_traits.
> Maybe somebody has a solution??
> <
>
> I assume you are adding the compiled regex lib to the linker command line?
I wasn't...
Now it works better. I just had to change two lines in
cpp_regex_traits.cpp
<- std::messages<char>::catalog cat = (regex_message_catalogue.size()) ?
(pm->open(regex_message_catalogue, l)) : (-1);
-> std::messages<char>::catalog cat = (regex_message_catalogue.size()) ?
(pm->open(const_cast<std::string &>(regex_message_catalogue),
l)) : (-1);
and:
<- std::messages<wchar_t>::catalog cat = regex_message_catalogue.size()
?
msgs.open(regex_message_catalogue, l) : -1;
-> std::messages<wchar_t>::catalog cat = regex_message_catalogue.size()
?
msgs.open(const_cast<std::string &>(regex_message_catalogue),
l) : -1;
because CC told me:
cc-1407 CC: ERROR File = cpp_regex_traits.cpp, Line = 566
The type qualifiers are dropped in binding the reference of type
"std::string &" to an initializer of type "const std::string".
std::messages<wchar_t>::catalog cat =
regex_message_catalogue.size() ? msgs.open(regex_message_catalogue, l) :
-1;
Thank you,
Frank Perbet.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk