This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 60097 - standard C++ string clear method missing
standard C++ string clear method missing
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: libstdc++ (Show other bugs)
7.2
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-19 18:02 EST by Christopher Mihaly
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-07-26 17:47:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Christopher Mihaly 2002-02-19 18:02:16 EST
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):
libstdc++-2.96-98
libstdc++-devel-2.96-98

How reproducible:
Always

Steps to Reproduce:
1.The following C++ file:
#include <string>

int
main(void) {

   string foo;
   foo.clear();
   return 0;
}
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.

Additional info:

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.
Comment 1 Bill Nottingham 2002-07-26 17:47:26 EDT
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.

http://rhn.redhat.com/errata/RHBA-2002-055.html

Note You need to log in before you can comment on or make changes to this bug.