root/test/manual/etags/cp-src/fail.C

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. f
  2. f
  3. main
  4. x

     1 /* Examples provided by Sam Kendall <kendall@mv.mv.com>, Jan 1997 */
     2 
     3 // check use of references with nested/local classes
     4 
     5 // This example causes etags 13 to abort when compiled with -DDEBUG.
     6 // Etags 13 cannot deal with nested structures after the first level.
     7 struct A {
     8            struct B {
     9                    struct C {
    10                            int x;
    11                            C(int i) {x = i;}
    12                            operator int() const {return x;}
    13                    };
    14                    typedef C T;
    15            };
    16            typedef B T2;
    17 };
    18 
    19 
    20 class String;
    21 
    22 
    23 class A {
    24         class B {
    25                 class C {};
    26                 int f() { return 5; }
    27         };
    28 };
    29 
    30 
    31 int A::B::f() { return 2; }
    32 
    33 
    34 A::B::C abc(-37);
    35 
    36 
    37 main()
    38 {
    39         if (abc != -37 || abt != -37) return 1;
    40 
    41         class D : public A::B::C {
    42         public:
    43                 D() : ::A::T2::T(97), x(1066) {}
    44                 int x;
    45         } &d = D();
    46 
    47         if (d.x != 1066 || d.A::T2::T::x != 97) return 2;
    48         return 0;
    49 }
    50 
    51 
    52 template <class T>

/* [<][>][^][v][top][bottom][index][help] */