home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stlpt453.zip / STLport-4.5.3 / test / regression / bug.cpp < prev    next >
C/C++ Source or Header  |  2000-12-07  |  1KB  |  99 lines

  1. # include <iostream>
  2. # include <string>
  3.  
  4. # if 0
  5. namespace N1 {
  6.      template <class T>
  7.      struct X {};
  8. }
  9.  
  10. namespace N2 {
  11.   using N1::X;
  12.   //  using namespace N1;
  13.   
  14.   class AA 
  15.   {
  16.     
  17.     X<int> xint;
  18.   }
  19.   ;
  20.   typedef X<int> xint;
  21.   
  22.   
  23.   template <class T>
  24.      struct X1 : N1::X<T> {}; // fatal error C1001:Internal compiler error
  25. }
  26.  
  27. namespace N3 {
  28.   using N1::X;
  29.   using N2::X;
  30.   using N2::xint;
  31.   
  32.   N2::xint x;
  33.   N2::X<int> y;
  34. }
  35.  
  36.  
  37. using N2::X;
  38. N2::X<int> y;
  39.  
  40. N2::X1<int> y;
  41.  
  42. main()
  43. {
  44.   std::basic_ostream<char, std::char_traits<char> > os;
  45.   
  46.   return 0;
  47. }
  48.  
  49. # endif
  50.  
  51. # include <iostream>
  52.  
  53. using namespace std;
  54.  
  55. # if 0
  56. class mystream : public std::istream 
  57. {
  58. public:
  59.     typedef std::istream _Base;
  60.     
  61.     mystream(const std::istream& s) :  _Base(s)
  62.         {
  63.         }
  64.  
  65.     mystream& operator >>(char& c) 
  66.         {
  67.             using std::istream;
  68.             ((std::istream&)*this)>> ( c ) ;
  69. //            istream::operator>>(c);
  70.             
  71.             return ( *this ) ;
  72.         }
  73.     
  74.     
  75. }
  76. ;
  77.  
  78. mystream& aaa ( mystream& m, char& c)
  79. {
  80.     m>>c;
  81.     return m;
  82. }
  83. # endif
  84.  
  85.  
  86. main()
  87. {
  88.     string sss = "Hello World";
  89.     string ss2 = "aaa";
  90.     
  91.     if (ss2 >= 'c' + sss)
  92.         cout<<(sss+ss2);
  93.     
  94. //    mystream mm(std::cin);
  95. //    char cc;
  96. //    aaa(mm, cc);
  97.     
  98. }
  99.