File: bug.cpp

package info (click to toggle)
stlport4.6 4.6.2-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 7,056 kB
  • ctags: 16,390
  • sloc: ansic: 46,190; cpp: 18,805; sh: 266; asm: 93; perl: 58; makefile: 10
file content (98 lines) | stat: -rw-r--r-- 1,284 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# include <iostream>
# include <string>

# if 0
namespace N1 {
     template <class T>
     struct X {};
}

namespace N2 {
  using N1::X;
  //  using namespace N1;
  
  class AA 
  {
    
    X<int> xint;
  }
  ;
  typedef X<int> xint;
  
  
  template <class T>
     struct X1 : N1::X<T> {}; // fatal error C1001:Internal compiler error
}

namespace N3 {
  using N1::X;
  using N2::X;
  using N2::xint;
  
  N2::xint x;
  N2::X<int> y;
}


using N2::X;
N2::X<int> y;

N2::X1<int> y;

main()
{
  std::basic_ostream<char, std::char_traits<char> > os;
  
  return 0;
}

# endif

# include <iostream>

using namespace std;

# if 0
class mystream : public std::istream 
{
public:
    typedef std::istream _Base;
    
    mystream(const std::istream& s) :  _Base(s)
        {
        }

    mystream& operator >>(char& c) 
        {
            using std::istream;
            ((std::istream&)*this)>> ( c ) ;
//            istream::operator>>(c);
            
            return ( *this ) ;
        }
    
    
}
;

mystream& aaa ( mystream& m, char& c)
{
    m>>c;
    return m;
}
# endif


main()
{
    string sss = "Hello World";
    string ss2 = "aaa";
    
    if (ss2 >= 'c' + sss)
        cout<<(sss+ss2);
    
//    mystream mm(std::cin);
//    char cc;
//    aaa(mm, cc);
    
}