diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-03 10:29:14 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-03 10:29:14 +0000 |
commit | 4a5f206f4c827402690d91341a9e857f8e78332f (patch) | |
tree | 9c11143e43b585952f5dbea6270fee64275a31e4 /libstdc++-v3/include/bits/stl_algobase.h | |
parent | 0db5de9587f47a14d3e543e9825005043ac0f1ac (diff) | |
download | ppe42-gcc-4a5f206f4c827402690d91341a9e857f8e78332f.tar.gz ppe42-gcc-4a5f206f4c827402690d91341a9e857f8e78332f.zip |
2007-03-03 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/28080 (partial)
* include/bits/stl_algobase.h: Do not include <iosfwd>,
<bits/functexcept.h> is enough; adjust __copy_aux declarations;
remove declaration of copy overload for istreambuf_iterator /
ostreambuf_iterator.
* src/debug.cc: Include <cstdio>.
* include/ext/rope: Include <iosfwd>.
* include/bits/char_traits.h: Include <cstdio> and <cwchar>.
* include/bits/stl_algo.h: Remove declaration of find overload
for istreambuf_iterator.
* include/std/queue: Clean up includes.
* include/std/stack: Likewise.
* include/std/memory: Likewise.
* include/std/algorithm: Likewise.
* include/std/vector: Likewise.
* include/std/deque: Likewise.
* include/std/list: Likewise.
* include/bits/stl_tree.h: Likewise.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
dg-error markers.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
* testsuite/23_containers/set/operators/1_neg.cc: Likewise.
* testsuite/23_containers/map/operators/1_neg.cc: Likewise.
* testsuite/20_util/auto_ptr/assign_neg.cc: Likewise.
* include/ext/type_traits.h: Fix type of __max_digits10; clean up
includes.
* testsuite/util/testsuite_hooks.h: Do not include <cstddef>.
* testsuite/util/testsuite_hooks.cc: Do it here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/stl_algobase.h')
-rw-r--r-- | libstdc++-v3/include/bits/stl_algobase.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 35a8a0383d8..a6d155a95a4 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -67,7 +67,7 @@ #include <cwchar> #include <cstdlib> #include <cstddef> -#include <iosfwd> +#include <bits/functexcept.h> #include <bits/stl_pair.h> #include <bits/cpp_type_traits.h> #include <ext/type_traits.h> @@ -317,21 +317,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } // Helpers for streambuf iterators (either istream or ostream). + // NB: avoid including <iosfwd>, relatively large. + template<typename _CharT> + struct char_traits; + + template<typename _CharT, typename _Traits> + class istreambuf_iterator; + + template<typename _CharT, typename _Traits> + class ostreambuf_iterator; + template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, - ostreambuf_iterator<_CharT> >::__type - __copy_aux(_CharT*, _CharT*, ostreambuf_iterator<_CharT>); + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_aux(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, - ostreambuf_iterator<_CharT> >::__type - __copy_aux(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT>); + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_aux(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type - __copy_aux(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, - _CharT*); + __copy_aux(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); template<bool, bool> struct __copy_normal @@ -403,13 +415,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __result); } - // Overload for streambuf iterators. - template<typename _CharT> - typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, - ostreambuf_iterator<_CharT> >::__type - copy(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, - ostreambuf_iterator<_CharT>); - template<bool, typename> struct __copy_backward { |