]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.jason/template27.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / template27.C
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template27.C b/gcc/testsuite/g++.old-deja/g++.jason/template27.C
deleted file mode 100644 (file)
index be90aca..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// PRMS Id: 6826
-// Check that unnecessary templates are not instantiated.
-
-template <class T> 
-class Test 
-{ 
- public: 
-  void doThiss(); 
-  void doThat(); 
-};
-
-template <class T> 
-void Test<T>::doThiss() 
-{ 
-  T x; 
-
-  x.thiss(); 
-} 
-
-template <class T> 
-void Test<T>::doThat() 
-{ 
-  T x; 
-
-  x.that(); 
-} 
-
-class A 
-{ 
- public: 
-  void thiss() {}; 
-};
-
-class B
-{ 
- public: 
-  void that() {}; 
-};
-
-int main() 
-{ 
-  Test<A> a; 
-  a.doThiss();                 // a.doThat() is not well formed, but then
-                               // it's not used so needn't be instantiated. 
-  
-  Test<B> b;
-  b.doThat();                  // simillarly b.doThiss(); 
-}