re PR libstdc++/12854 (libstdc++ vs. -Weffc++)
authorBenjamin Kosnik <bkoz@redhat.com>
Sat, 22 May 2004 23:46:34 +0000 (23:46 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Sat, 22 May 2004 23:46:34 +0000 (23:46 +0000)
commit26c691a88b8a403e7a92ce049368cc7efe3567ce
tree4eb79935bc90f022040e5aed4af6bec9bdfa0b5f
parentd6dc556b315b8e1b99922eda0319548ecb5233e9
re PR libstdc++/12854 (libstdc++ vs. -Weffc++)

2004-05-22  Benjamin Kosnik  <bkoz@redhat.com>

PR libstdc++/12854
Fixups for -Weffc++.
* include/bits/basic_string.h (basic_string::operator=): Return
pointer to this instead of result of assign. Although redundant,
this doesn't impact resultant codegen.

* include/bits/locale_facets.h (__numpunct_cache): Declare
assignment opxserator and copy constructor private.
(__timepunct_cache): Same.
(__moneypunct_cache): Same.
(collate): Use member initialization list for _M_c_locale_collate.
* config/locale/gnu/messages_members.h: Same.
* config/locale/gnu/time_members.h (__timepunct): Same.
* src/codecvt.cc: Use member initialization list to initialize
_M_c_locale_codecvt.
* src/ctype.cc: Same, with _M_c_locale_ctype and _M_narrow_ok.
* config/os/gnu-linux/ctype_noninline.h: Same.
* src/locale.cc (_Impl): Same.
* src/locale_init.cc: Same.
* src/localename.cc: Same.

* include/bits/basic_ios.h (basic_ios): Complete member
initialization list.
* include/bits/istream.tcc (basic_istream::sentry): Same.
* include/bits/ostream.tcc (basic_ostream::sentry): Same.
* include/bits/fstream.tcc (basic_filebuf): Add _M_lock and
_M_pback to member initialization list.
* include/std/std_streambuf.h: Same.
* include/std/std_sstream.h: Same, for _M_mode.
* src/ios.cc (ios_base): Same.

* include/ext/rope: Make derived classes match exception

 specifications. Add copy constructors and assignment operators.

* include/debug/safe_base.h (_Safe_sequence_base): Declare copy
constructor and assignment operator protected.
(_Safe_iterator_base): Same.
* include/debug/formatter.h (_Error_formatter): Define copy
constructor and assignment operator.

* include/backward/strstream: Declare assignment operator and copy
constructor private.

From-SVN: r82153
24 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/locale/gnu/messages_members.h
libstdc++-v3/config/locale/gnu/time_members.h
libstdc++-v3/config/os/gnu-linux/ctype_noninline.h
libstdc++-v3/include/backward/strstream
libstdc++-v3/include/bits/basic_ios.h
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/include/bits/istream.tcc
libstdc++-v3/include/bits/locale_classes.h
libstdc++-v3/include/bits/locale_facets.h
libstdc++-v3/include/bits/ostream.tcc
libstdc++-v3/include/debug/formatter.h
libstdc++-v3/include/debug/safe_base.h
libstdc++-v3/include/ext/rope
libstdc++-v3/include/std/std_sstream.h
libstdc++-v3/include/std/std_streambuf.h
libstdc++-v3/src/codecvt.cc
libstdc++-v3/src/ctype.cc
libstdc++-v3/src/ios.cc
libstdc++-v3/src/locale.cc
libstdc++-v3/src/locale_init.cc
libstdc++-v3/src/localename.cc
libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc