aboutsummaryrefslogtreecommitdiff
path: root/libstdc++/std
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-05-11 22:04:43 +0000
committerJeffrey A Law <law@cygnus.com>1998-05-11 22:04:43 +0000
commit7af2086a13c0ef46115d54ee1bbd686b682c4022 (patch)
tree483e56aea870b1178c9c7d5229254c3934345844 /libstdc++/std
parentbbf8fe9aab0e38f5018ffd86a489bf2d13408407 (diff)
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: https://gcc.gnu.org/svn/gcc/trunk@19684 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++/std')
-rw-r--r--libstdc++/std/bastring.cc2
-rw-r--r--libstdc++/std/bastring.h2
2 files changed, 2 insertions, 2 deletions
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()); }