OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [tem02.C] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
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'
5
 
6
template struct char_traits;
7
template struct char_traits { };
8
template<> struct char_traits;
9
template<> struct char_traits { };
10
 
11
template > class istreambuf_iterator;
12
 
13
 
14
template
15
  class istreambuf_iterator
16
{
17
 public:
18
  typedef _Traits traits_type;
19
  class _Proxy;
20
 public:
21
  inline istreambuf_iterator() throw();
22
  inline istreambuf_iterator(const _Proxy& __p) throw();
23
};
24
 
25
 
26
template 
27
  class istreambuf_iterator<_CharT,_Traits>::_Proxy
28
{
29
 public:
30
  _CharT operator*();
31
 
32
  //bug -g++  w/ decl "redef", no decl no prob.
33
  //ok -edg: no warnings
34
  friend class istreambuf_iterator;  //  XXX  OK?
35
 
36
  //bug -g++ w/ decl "redef", no decl no prob.
37
  //ok -edg: no warnings
38
  //friend class istreambuf_iterator<_CharT,_Traits>;
39
 
40
  //bug -g++ w/ decl "redef", no decl no prob.
41
  //ok -edg: declaration of "_CharT" and "_Traits" hides template parameter
42
  //template  friend class istreambuf_iterator;
43
 
44
  //ok -g++
45
  //ok -edg
46
  //friend class istreambuf_iterator<_CharT>;
47
 
48
};
49
 
50
 
51
 
52
//explicit instantiation of a nested class
53
template class istreambuf_iterator >::_Proxy;
54
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.