2 //980519 bad error from nathan
3 //$ egcs -fhonor-std -nostdinc -c redef.C
4 //redef.C:56: redefinition of default argument for `class _Traits'
6 template<class _CharT> struct char_traits;
7 template<class _CharT> struct char_traits { };
8 template<> struct char_traits<char>;
9 template<> struct char_traits<char> { };
11 template<class _CharT, class _Traits = char_traits<_CharT> > class istreambuf_iterator;
14 template<class _CharT, class _Traits>
15 class istreambuf_iterator
18 typedef _Traits traits_type;
21 inline istreambuf_iterator() throw();
22 inline istreambuf_iterator(const _Proxy& __p) throw();
26 template <class _CharT, class _Traits>
27 class istreambuf_iterator<_CharT,_Traits>::_Proxy
32 //bug -g++ w/ decl "redef", no decl no prob.
33 //ok -edg: no warnings
34 friend class istreambuf_iterator; // XXX OK?
36 //bug -g++ w/ decl "redef", no decl no prob.
37 //ok -edg: no warnings
38 //friend class istreambuf_iterator<_CharT,_Traits>;
40 //bug -g++ w/ decl "redef", no decl no prob.
41 //ok -edg: declaration of "_CharT" and "_Traits" hides template parameter
42 //template <class _CharT, class _Traits> friend class istreambuf_iterator;
46 //friend class istreambuf_iterator<_CharT>;
52 //explicit instantiation of a nested class
53 template class istreambuf_iterator<char, char_traits<char> >::_Proxy;