Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
5a1a4615
Commit
5a1a4615
authored
Jul 02, 1998
by
Ulrich Drepper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(class basic_string): Return correct iterators in erase member functions.
From-SVN: r20906
parent
6feacd09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
libstdc++/std/bastring.h
+6
-2
No files found.
libstdc++/std/bastring.h
View file @
5a1a4615
...
...
@@ -227,9 +227,13 @@ public:
basic_string
&
erase
(
size_type
pos
=
0
,
size_type
n
=
npos
)
{
return
replace
(
pos
,
n
,
(
size_type
)
0
,
(
charT
)
0
);
}
iterator
erase
(
iterator
p
)
{
replace
(
p
-
ibegin
(),
1
,
(
size_type
)
0
,
(
charT
)
0
);
selfish
();
return
p
;
}
{
size_type
__o
=
p
-
begin
();
replace
(
__o
,
1
,
(
size_type
)
0
,
(
charT
)
0
);
selfish
();
return
ibegin
()
+
__o
;
}
iterator
erase
(
iterator
f
,
iterator
l
)
{
replace
(
f
-
ibegin
(),
l
-
f
,
(
size_type
)
0
,
(
charT
)
0
);
selfish
();
return
f
;
}
{
size_type
__o
=
f
-
ibegin
();
replace
(
__o
,
l
-
f
,
(
size_type
)
0
,
(
charT
)
0
);
selfish
();
return
ibegin
()
+
__o
;
}
basic_string
&
replace
(
size_type
pos1
,
size_type
n1
,
const
basic_string
&
str
,
size_type
pos2
=
0
,
size_type
n2
=
npos
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment