Home | History | Annotate | Download | only in CodeGenCXX

Lines Matching full:template

115 template<typename T> __declspec(dllimport) extern int ExternVarTmplDecl;
121 template<typename T> __declspec(dllimport) int VarTmplDecl;
127 template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
128 template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
133 template<typename T> __declspec(dllimport) int VarTmplRedecl2;
134 template<typename T> __declspec(dllimport) int VarTmplRedecl2;
139 template<typename T> __declspec(dllimport) extern int VarTmplRedecl3;
140 template<typename T> extern int VarTmplRedecl3; // dllimport ignored
146 namespace ns { template<typename T> __declspec(dllimport) int ExternalVarTmpl; }
150 template<typename T> int VarTmpl;
151 template<typename T> __declspec(dllimport) int ImportedVarTmpl;
153 // Import implicit instantiation of an imported variable template.
158 // Import explicit instantiation declaration of an imported variable template.
161 extern template int ImportedVarTmpl<ExplicitDecl_Imported>;
164 // An explicit instantiation definition of an imported variable template cannot
165 // be imported because the template must be defined which is illegal.
167 // Import specialization of an imported variable template.
170 template<> __declspec(dllimport) int ImportedVarTmpl<ExplicitSpec_Imported>;
173 // Not importing specialization of an imported variable template without
177 template<> int ImportedVarTmpl<ExplicitSpec_NotImported>;
180 // Import explicit instantiation declaration of a non-imported variable template.
183 extern template __declspec(dllimport) int VarTmpl<ExplicitDecl_Imported>;
186 // Import explicit instantiation definition of a non-imported variable template.
189 template __declspec(dllimport) int VarTmpl<ExplicitInst_Imported>;
192 // Import specialization of a non-imported variable template.
195 template<> __declspec(dllimport) int VarTmpl<ExplicitSpec_Imported>;
363 // Import function template declaration.
366 template<typename T> __declspec(dllimport) void funcTmplDecl();
369 // Function template definitions cannot be imported.
371 // Import inline function template.
376 template<typename T> __declspec(dllimport) inline void inlineFuncTmpl1() {}
383 template<typename T> inline void __attribute__((dllimport)) inlineFuncTmpl2() {}
390 template<typename T> __declspec(dllimport) inline void inlineFuncTmplDecl();
391 template<typename T> void inlineFuncTmplDecl() {}
398 template<typename T> __declspec(dllimport) void inlineFuncTmplDef();
399 template<typename T> inline void inlineFuncTmplDef() {}
406 template<typename T> __declspec(dllimport) void funcTmplRedecl1();
407 template<typename T> __declspec(dllimport) void funcTmplRedecl1();
412 template<typename T> __declspec(dllimport) void funcTmplRedecl2();
413 template<typename T> void funcTmplRedecl2(); // dllimport ignored
418 template<typename T> __declspec(dllimport) void funcTmplRedecl3();
419 template<typename T> void funcTmplRedecl3() {} // dllimport ignored
423 // Function template friends
433 template<typename T> friend __declspec(dllimport) void funcTmplFriend1();
434 template<typename T> friend __declspec(dllimport) void funcTmplFriend2();
435 template<typename T> friend __declspec(dllimport) void funcTmplFriend3();
436 template<typename T> friend __declspec(dllimport) inline void funcTmplFriend4();
438 template<typename T> __declspec(dllimport) void funcTmplFriend1();
439 template<typename T> void funcTmplFriend2(); // dllimport ignored
440 template<typename T> void funcTmplFriend3() {} // dllimport ignored
441 template<typename T> inline void funcTmplFriend4() {}
449 namespace ns { template<typename T> __declspec(dllimport) void externalFuncTmpl(); }
453 template<typename T> void funcTmpl() {}
454 template<typename T> inline void inlineFuncTmpl() {}
455 template<typename T> __declspec(dllimport) void importedFuncTmplDecl();
456 template<typename T> __declspec(dllimport) inline void importedFuncTmpl() {}
458 // Import implicit instantiation of an imported function template.
469 // Import explicit instantiation declaration of an imported function template.
474 extern template void importedFuncTmpl<ExplicitDecl_Imported>();
477 // Import explicit instantiation definition of an imported function template.
482 template void importedFuncTmpl<ExplicitInst_Imported>();
486 // Import specialization of an imported function template.
489 template<> __declspec(dllimport) void importedFuncTmplDecl<ExplicitSpec_Imported>();
495 //template<> __declspec(dllimport) void importedFuncTmplDecl<ExplicitSpec_Def_Imported>() {}
503 template<> __declspec(dllimport) inline void importedFuncTmplDecl<ExplicitSpec_InlineDef_Imported>() {}
509 template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Imported>();
515 //template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Def_Imported>() {}
523 template<> __declspec(dllimport) inline void importedFuncTmpl<ExplicitSpec_InlineDef_Imported>() {}
527 // Not importing specialization of an imported function template without
531 template<> void importedFuncTmpl<ExplicitSpec_NotImported>() {}
535 // Import explicit instantiation declaration of a non-imported function template.
542 extern template __declspec(dllimport) void funcTmpl<ExplicitDecl_Imported>();
543 extern template __declspec(dllimport) void inlineFuncTmpl<ExplicitDecl_Imported>();
548 // Import explicit instantiation definition of a non-imported function template.
557 template __declspec(dllimport) void funcTmpl<ExplicitInst_Imported>();
558 template __declspec(dllimport) void inlineFuncTmpl<ExplicitInst_Imported>();
563 // Import specialization of a non-imported function template.
566 template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Imported>();
572 //template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Def_Imported>() {}
580 template<> __declspec(dllimport) inline void funcTmpl<ExplicitSpec_InlineDef_Imported>() {}
609 template <typename T> struct __declspec(dllimport) U { void foo() {} };
658 template <typename T>
664 template class C<char>;
668 // Regular template static field:
669 template <typename T> struct __declspec(dllimport) S {
672 template <typename T> int S<T>::x;
676 // Partial class template specialization static field:
677 template <typename A> struct T;
678 template <typename A> struct __declspec(dllimport) T<A*> {
681 template <typename A> int T<A*>::x;
692 template <typename T> struct A { static NonPOD x; };
693 template <typename T> NonPOD A<T>::x;
694 template struct __declspec(dllimport) A<int>;
698 template <typename T> struct B { static int x; };
699 template <typename T> int B<T>::x = f();
700 template struct __declspec(dllimport) B<int>;
704 template <typename T> struct C { static int x; };
705 template <typename T> int C<T>::x = g();
706 template struct __declspec(dllimport) C<int>;
709 template <int I> struct D { static int x, y; };
710 template <int I> int D<I>::x = I + 1;
711 template <int I> int D<I>::y = I + f();
712 template struct __declspec(dllimport) D<42>;
741 template <typename T> struct PartiallySpecializedClassTemplate {};
742 template <typename T> struct __declspec(dllimport) PartiallySpecializedClassTemplate<T*> { void f(); };
748 template <typename T> struct ExplicitlySpecializedClassTemplate {};
749 template <> struct __declspec(dllimport) ExplicitlySpecializedClassTemplate<void*> { void f(); };
755 template <typename T> struct __declspec(dllimport) PartiallySpecializedImportedClassTemplate {};
756 template <typename T> struct PartiallySpecializedImportedClassTemplate<T*> { void f() {} };
761 // Attributes on the instantiation take precedence over attributes on the template.
762 template <typename T> struct __declspec(dllexport) ExplicitlyInstantiatedWithDifferentAttr { void f() {} };
763 template struct __declspec(dllimport) ExplicitlyInstantiatedWithDifferentAttr<int>;
767 template <typename T> struct ExplicitInstantiationDeclImportedDefTemplate { void f() {} ExplicitInstantiationDeclImportedDefTemplate() {}};
768 extern template struct ExplicitInstantiationDeclImportedDefTemplate<int>;
769 template struct __declspec(dllimport) ExplicitInstantiationDeclImportedDefTemplate<int>;
776 template <typename T> struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate { void f() {} ExplicitInstantiationDeclExportedDefImportedTemplate() {} };
777 extern template struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate <int>;
778 template struct __declspec(dllexport) ExplicitInstantiationDeclExportedDefImportedTemplate<int>;
784 template <typename T> struct PR23770BaseTemplate { void f() {} };
785 template <typename T> struct PR23770DerivedTemplate : PR23770BaseTemplate<int> {};
786 extern template struct PR23770DerivedTemplate<int>;
787 template struct __declspec(dllimport) PR23770DerivedTemplate<int>;
792 // Classes with template base classes
795 template <typename T> struct ClassTemplate { void func() {} };
796 template <typename T> struct __declspec(dllexport) ExportedClassTemplate { void func(); };
797 template <typename T> void ExportedClassTemplate<T>::func() {}
798 template <typename T> struct __declspec(dllimport) ImportedClassTemplate { void func(); };
800 template <typename T> struct ExplicitlySpecializedTemplate { void func() {} };
801 template <> struct ExplicitlySpecializedTemplate<int> { void func() {} };
802 template <typename T> struct ExplicitlyExportSpecializedTemplate { void func() {} };
803 template <> struct __declspec(dllexport) ExplicitlyExportSpecializedTemplate<int> { void func(); };
805 template <typename T> struct ExplicitlyImportSpecializedTemplate { void func() {} };
806 template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func(); };
808 template <typename T> struct ExplicitlyInstantiatedTemplate { void func() {} };
809 template struct ExplicitlyInstantiatedTemplate<int>;
810 template <typename T> struct ExplicitlyExportInstantiatedTemplate { void func(); };
811 template <typename T> void ExplicitlyExportInstantiatedTemplate<T>::func() {}
812 template struct __declspec(dllexport) ExplicitlyExportInstantiatedTemplate<int>;
813 template <typename T> struct ExplicitlyImportInstantiatedTemplate { void func(); };
814 template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
886 template <typename T> struct TopClass { void func() {} };
887 template <typename T> struct MiddleClass : public TopClass<T> { };
893 template <typename T> struct ExplicitInstantiationDeclTemplateBase { void func() {} };
894 extern template struct ExplicitInstantiationDeclTemplateBase<int>;
896 template
901 template <typename T> struct ExplicitInstantiationDeclTemplateBase2 { void func() {} };
902 extern template struct ExplicitInstantiationDeclTemplateBase2<int>;
904 template struct __declspec(dllexport) ExplicitInstantiationDeclTemplateBase2<int>;