diff options
author | Jeff Law <law@gcc.gnu.org> | 1998-05-11 16:04:43 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-05-11 16:04:43 -0600 |
commit | fc438e2ad07c189dfe97f148205cee9d5d312352 (patch) | |
tree | 483e56aea870b1178c9c7d5229254c3934345844 /libstdc++/std | |
parent | 881060d07fcd9b2d0049948c2148af3203868e19 (diff) | |
download | gcc-fc438e2ad07c189dfe97f148205cee9d5d312352.zip gcc-fc438e2ad07c189dfe97f148205cee9d5d312352.tar.gz gcc-fc438e2ad07c189dfe97f148205cee9d5d312352.tar.bz2 |
[multiple changes]
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.
From-SVN: r19684
Diffstat (limited to 'libstdc++/std')
-rw-r--r-- | libstdc++/std/bastring.cc | 2 | ||||
-rw-r--r-- | libstdc++/std/bastring.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++/std/bastring.cc b/libstdc++/std/bastring.cc index 30a2382..fca6f29 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 cbc6e438..8b009a4 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()); } |