+ // if the typename equals one of the current generic instantiations\r
+ // print instantiated type instead\r
+ for (auto kv : currentInstantiation)\r
+ {\r
+ if (t.name == kv.first)\r
+ {\r
+ out << kv.second;\r
+ return out;\r
+ }\r
+ }\r
+ TypeInfo ti = typeType(globalCtx, t);\r
+ if (ti.isStruct)\r
+ out << "struct ";\r
+ // try finding type in current context\r
+ auto s = findStruct(t.name, t.namespacePrefixes, globalCtx);\r
+ // print prefix for either found type or the specified \r
+ // prefix if type is not found (shouldn't happen)\r
+ if (s.has_value())\r
+ out << vectorStr(std::get<1>(*s), "_", true) << t.name; \r
+ else\r
+ out << vectorStr(t.namespacePrefixes, "_", true) << t.name;\r
+\r
+ // print generic appendix\r
+ if (!t.genericInstantiation.empty())\r
+ out << genericAppendix(t.genericInstantiation);\r