summaryrefslogtreecommitdiff
path: root/libstdc++
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-11 22:04:43 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-11 22:04:43 +0000
commit7155625053ef0a69e2d720baaab7af0389429503 (patch)
tree483e56aea870b1178c9c7d5229254c3934345844 /libstdc++
parent8778c402a6be4a125bc5999a8d12e16eb1369fab (diff)
downloadgcc-7155625053ef0a69e2d720baaab7af0389429503.tar.gz
Tue Mar 24 10:13:07 1998 Jason Merrill <jason@yorick.cygnus.com>
* std/bastring.cc (basic_string::copy): Mark const here, too. 1998-03-23 15:59 Ulrich Drepper <drepper@cygnus.com> * std/bastring.h (basic_string::copy): Mark copy function as const. Reported by Scott Schurr <scotts@ims.com>. Bring over from devo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19684 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++')
-rw-r--r--libstdc++/ChangeLog9
-rw-r--r--libstdc++/std/bastring.cc2
-rw-r--r--libstdc++/std/bastring.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog
index 04744929e8d..f3592ad33bb 100644
--- a/libstdc++/ChangeLog
+++ b/libstdc++/ChangeLog
@@ -1,3 +1,12 @@
+Tue Mar 24 10:13:07 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * std/bastring.cc (basic_string::copy): Mark const here, too.
+
+1998-03-23 15:59 Ulrich Drepper <drepper@cygnus.com>
+
+ * std/bastring.h (basic_string::copy): Mark copy function as const.
+ Reported by Scott Schurr <scotts@ims.com>.
+
Thu Mar 5 09:23:28 1998 Manfred Hollstein <manfred@s-direktnet.de>
* configure.in: Make locating frag files failsafe even for the
diff --git a/libstdc++/std/bastring.cc b/libstdc++/std/bastring.cc
index 30a2382f90b..fca6f29680b 100644
--- a/libstdc++/std/bastring.cc
+++ b/libstdc++/std/bastring.cc
@@ -228,7 +228,7 @@ resize (size_type n, charT c)
template <class charT, class traits, class Allocator>
basic_string <charT, traits, Allocator>::size_type
basic_string <charT, traits, Allocator>::
-copy (charT* s, size_type n, size_type pos)
+copy (charT* s, size_type n, size_type pos) const
{
OUTOFRANGE (pos > length ());
diff --git a/libstdc++/std/bastring.h b/libstdc++/std/bastring.h
index cbc6e4384c8..8b009a4ad8c 100644
--- a/libstdc++/std/bastring.h
+++ b/libstdc++/std/bastring.h
@@ -296,7 +296,7 @@ public:
{ resize (n, eos ()); }
void reserve (size_type) { }
- size_type copy (charT* s, size_type n, size_type pos = 0);
+ size_type copy (charT* s, size_type n, size_type pos = 0) const;
size_type find (const basic_string& str, size_type pos = 0) const
{ return find (str.data(), pos, str.length()); }