* ru.po: Update.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / conversion6.C
blob5f5a51a2f354512428ac485cea99ec8ff730c0b5
1 // { dg-do run  }
2 // PRMS Id: g++/6034
4 extern "C" int printf (const char *, ...);
6 class Base
8         char x;
9 };
11 template <class T>
12 // remove the public Base inheritance and the problem goes away...
13 class Container : public Base
15 public:
17     Container(const T& aValue): myValue(aValue) { }
18     
19     operator const T&(void) const
20     {
21         printf("Container::const T& called\n");
22         return myValue;
23     }
24     
25 protected:
27     T myValue;
30 typedef unsigned short Type;
32 typedef Container<Type> TypeContainer;
34 int main(void)
36     TypeContainer myTypeContainer(2);
37     Type t = myTypeContainer;
39     printf ("myType = %d\n", t);
40     return t != 2;