Home | History | Annotate | Download | only in CodeGenCXX

Lines Matching full:template

22 #define INSTVAR(var) template int var;
23 #define INST(func) template void func();
104 template<typename T> __declspec(dllexport) int VarTmplDef;
109 template<typename T> __declspec(dllexport) int VarTmplImplicitDef;
115 template<typename T> __declspec(dllexport) int VarTmplInit1 = 1;
120 template<typename T> int __declspec(dllexport) VarTmplInit2 = 1;
126 template<typename T> __declspec(dllexport) extern int VarTmplDeclInit;
127 template<typename T> int VarTmplDeclInit = 1;
133 template<typename T> __declspec(dllexport) extern int VarTmplRedecl1;
134 template<typename T> __declspec(dllexport) int VarTmplRedecl1 = 1;
139 template<typename T> __declspec(dllexport) extern int VarTmplRedecl2;
140 template<typename T> int VarTmplRedecl2 = 1;
145 namespace ns { template<typename T> __declspec(dllexport) int ExternalVarTmpl = 1; }
150 template<typename T> __declspec(dllexport) auto ExternalAutoTypeVarTmpl = External();
151 template External ExternalAutoTypeVarTmpl<ExplicitInst_Exported>;
154 template<typename T> int VarTmpl = 1;
155 template<typename T> __declspec(dllexport) int ExportedVarTmpl = 1;
157 // Export implicit instantiation of an exported variable template.
162 // Export explicit instantiation declaration of an exported variable template.
165 extern template int ExportedVarTmpl<ExplicitDecl_Exported>;
166 template int ExportedVarTmpl<ExplicitDecl_Exported>;
168 // Export explicit instantiation definition of an exported variable template.
171 template __declspec(dllexport) int ExportedVarTmpl<ExplicitInst_Exported>;
173 // Export specialization of an exported variable template.
176 template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Exported>;
180 template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Def_Exported> = 1;
182 // Not exporting specialization of an exported variable template without
186 template<> int ExportedVarTmpl<ExplicitSpec_NotExported>;
189 // Export explicit instantiation declaration of a non-exported variable template.
192 extern template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
193 template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
195 // Export explicit instantiation definition of a non-exported variable template.
198 template __declspec(dllexport) int VarTmpl<ExplicitInst_Exported>;
200 // Export specialization of a non-exported variable template.
203 template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Exported>;
207 template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Def_Exported> = 1;
281 // Export function template definition.
284 template<typename T> __declspec(dllexport) void funcTmplDef() {}
287 // Export inline function template.
290 template<typename T> __declspec(dllexport) inline void inlineFuncTmpl1() {}
295 template<typename T> inline void __attribute__((dllexport)) inlineFuncTmpl2() {}
300 template<typename T> __declspec(dllexport) inline void inlineFuncTmplDecl();
301 template<typename T> void inlineFuncTmplDecl() {}
306 template<typename T> __declspec(dllexport) void inlineFuncTmplDef();
307 template<typename T> inline void inlineFuncTmplDef() {}
314 template<typename T> __declspec(dllexport) void funcTmplRedecl1();
315 template<typename T> __declspec(dllexport) void funcTmplRedecl1() {}
320 template<typename T> __declspec(dllexport) void funcTmplRedecl2();
321 template<typename T> void funcTmplRedecl2() {}
326 template<typename T> __declspec(dllexport) void funcTmplRedecl3();
327 template<typename T> void funcTmplRedecl3() {}
331 // Function template friends
337 template<typename T> friend __declspec(dllexport) void funcTmplFriend1();
338 template<typename T> friend __declspec(dllexport) void funcTmplFriend2();
340 template<typename T> __declspec(dllexport) void funcTmplFriend1() {}
341 template<typename T> void funcTmplFriend2() {}
347 namespace ns { template<typename T> __declspec(dllexport) void externalFuncTmpl() {} }
351 template<typename T> void funcTmpl() {}
352 template<typename T> __declspec(dllexport) void exportedFuncTmpl() {}
354 // Export implicit instantiation of an exported function template.
359 // Export explicit instantiation declaration of an exported function template.
362 extern template void exportedFuncTmpl<ExplicitDecl_Exported>();
363 template void exportedFuncTmpl<ExplicitDecl_Exported>();
365 // Export explicit instantiation definition of an exported function template.
368 template void exportedFuncTmpl<ExplicitInst_Exported>();
370 // Export specialization of an exported function template.
373 template<> __declspec(dllexport) void exportedFuncTmpl<ExplicitSpec_Def_Exported>() {}
377 template<> __declspec(dllexport) inline void exportedFuncTmpl<ExplicitSpec_InlineDef_Exported>() {}
379 // Not exporting specialization of an exported function template without
383 template<> void exportedFuncTmpl<ExplicitSpec_NotExported>() {}
386 // Export explicit instantiation declaration of a non-exported function template.
389 extern template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
390 template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
392 // Export explicit instantiation definition of a non-exported function template.
395 template __declspec(dllexport) void funcTmpl<ExplicitInst_Exported>();
397 // Export specialization of a non-exported function template.
400 template<> __declspec(dllexport) void funcTmpl<ExplicitSpec_Def_Exported>() {}
404 template<> __declspec(dllexport) inline void funcTmpl<ExplicitSpec_InlineDef_Exported>() {}
526 template <typename T>
536 template <typename>
573 template <typename T> struct __declspec(dllexport) U { void foo() {} };
639 template <typename T> struct PartiallySpecializedClassTemplate {};
640 template <typename T> struct __declspec(dllexport) PartiallySpecializedClassTemplate<T*> { void f(); };
641 template <typename T> void PartiallySpecializedClassTemplate<T*>::f() {}
647 template
648 template <> struct __declspec(dllexport) ExplicitlySpecializedClassTemplate<void*> { void f(); };
655 template <typename T> struct __declspec(dllexport) PartiallySpecializedExportedClassTemplate {};
656 template <typename T> struct PartiallySpecializedExportedClassTemplate<T*> { void f() {} };
662 template <typename T> struct __declspec(dllexport) PartiallySpecializedExportedClassTemplate2 {};
663 template <typename T> struct __declspec(dllimport) PartiallySpecializedExportedClassTemplate2<T*> { void f(); };
664 template <typename T> void PartiallySpecializedExportedClassTemplate2<T*>::f() {}
669 // Attributes on the instantiation take precedence over attributes on the template.
670 template <typename T> struct __declspec(dllimport) ExplicitlyInstantiatedWithDifferentAttr { void f() {} };
671 template struct __declspec(dllexport) ExplicitlyInstantiatedWithDifferentAttr<int>;
685 template <typename T> struct ExplicitInstConstexprMembers {
698 template struct __declspec(dllexport) ExplicitInstConstexprMembers<void>;
700 template <typename T> struct ExplicitInstantiationDeclTemplate { void f() {} };
701 extern template struct __declspec(dllexport) ExplicitInstantiationDeclTemplate<int>;
705 template <typename T> struct __declspec(dllexport) ExplicitInstantiationDeclExportedTemplate { void f() {} };
706 extern template struct ExplicitInstantiationDeclExportedTemplate<int>;
710 template <typename T> struct ExplicitInstantiationDeclExportedDefTemplate { void f() {} ExplicitInstantiationDeclExportedDefTemplate() {} };
711 extern template struct ExplicitInstantiationDeclExportedDefTemplate<int>;
712 template struct __declspec(dllexport) ExplicitInstantiationDeclExportedDefTemplate<int>;
726 template <typename T> struct PR23770BaseTemplate { void f() {} };
727 template <typename T> struct PR23770DerivedTemplate : PR23770BaseTemplate<int> {};
728 extern template struct PR23770DerivedTemplate<int>;
729 template struct __declspec(dllexport) PR23770DerivedTemplate<int>;
739 // dllexport an already instantiated class template.
740 template <typename T> struct Base {
756 template <typename T> struct Base {
767 template <typename T> struct Foo {};
768 template <typename T> struct Bar {
782 // Classes with template base classes
785 template <typename T> struct ClassTemplate { void func(); };
786 template <typename T> void ClassTemplate<T>::func() {}
787 template <typename T> struct __declspec(dllexport) ExportedClassTemplate { void func(); };
788 template <typename T> void ExportedClassTemplate<T>::func() {}
789 template <typename T> struct __declspec(dllimport) ImportedClassTemplate { void func(); };
790 template <typename T> void ImportedClassTemplate<T>::func() {}
792 template <typename T> struct ExplicitlySpecializedTemplate { void func() {} };
793 template <> struct ExplicitlySpecializedTemplate<int> { void func(); };
795 template <typename T> struct ExplicitlyExportSpecializedTemplate { void func() {} };
796 template <> struct __declspec(dllexport) ExplicitlyExportSpecializedTemplate<int> { void func(); };
798 template <typename T> struct ExplicitlyImportSpecializedTemplate { void func(); };
799 template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func(); };
801 template <typename T> struct ExplicitlyInstantiatedTemplate { void func(); };
802 template <typename T> void ExplicitlyInstantiatedTemplate<T>::func() {}
803 template struct ExplicitlyInstantiatedTemplate<int>;
804 template <typename T> struct ExplicitlyExportInstantiatedTemplate { void func(); };
805 template <typename T> void ExplicitlyExportInstantiatedTemplate<T>::func() {}
806 template struct __declspec(dllexport) ExplicitlyExportInstantiatedTemplate<int>;
807 template <typename T> struct ExplicitlyImportInstantiatedTemplate { void func(); };
808 template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
880 template <typename T> struct TopClass { void func() {} };
881 template <typename T> struct MiddleClass : public TopClass<T> { };
887 template <typename T> struct ExplicitInstantiationDeclTemplateBase { void func() {} };
888 extern template struct ExplicitInstantiationDeclTemplateBase<int>;
890 template struct ExplicitInstantiationDeclTemplateBase<int>;
894 template <typename T> struct ExplicitInstantiationDeclTemplateBase2 { void func() {} };
895 extern template struct ExplicitInstantiationDeclTemplateBase2<int>;
897 template struct __declspec(dllimport) ExplicitInstantiationDeclTemplateBase2<int>;