Red Hat Bugzilla – Bug 60097
standard C++ string clear method missing
Last modified: 2008-05-01 11:38:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8+) Gecko/20020208
Description of problem:
The clear method of the string class in the Standard C++ library is not defined.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.The following C++ file:
2. Try to compile g++ -o t t.C
Actual Results: You will get:
niobium:(kida_cmihaly):stuff> g++ -o a a.C
a.C: In function `int main ()':
a.C:7: no matching function for call to `basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> >::clear
Expected Results: A successfull build.
The erase function appears to be defined and we are using as a workaround. This
does cause cross platform problems because on other platforms, the clear
function is optimized.
An errata has been issued which should help the problem described in this bug report.
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen
this bug report if the solution does not work for you.