Skip to content

Commit

Permalink
LuaSolSources: fix ClassTemplatePartialSpecialization Parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlocklogic committed Dec 17, 2023
1 parent 6360b77 commit c12d4e7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Generator/Generators/Registrable/Lua/Sol/LuaSolSources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1877,23 +1877,22 @@ public virtual void GenerateClassTemplateSpecializationDeclFunctorValueType(Clas

public virtual void GenerateClassTemplateSpecializationDeclBegin(ClassTemplateSpecialization specialization)
{
ClassTemplatePartialSpecialization classTemplatePartialSpecialization = specialization as ClassTemplatePartialSpecialization;
Write("template <");
if (specialization.Access == AccessSpecifier.Protected)
{
Write("typename Importer>");
if (specialization is ClassTemplatePartialSpecialization)
if (classTemplatePartialSpecialization != null)
{
// TODO: provisional and WRONG: see https://github.com/mono/CppSharp/issues/1801
if (specialization.TemplatedDecl.Parameters.Count > 0)
if (classTemplatePartialSpecialization.Parameters.Count > 0)
{
Write(", ");
}
}
}
if (specialization is ClassTemplatePartialSpecialization)
if (classTemplatePartialSpecialization != null)
{
// TODO: provisional and WRONG: see https://github.com/mono/CppSharp/issues/1801
Write(NamingStrategy.PrintClassTemplateParameters(specialization.TemplatedDecl.Parameters, false, TemplateParameterOption.AsParameter));
Write(NamingStrategy.PrintClassTemplateParameters(classTemplatePartialSpecialization.Parameters, false, TemplateParameterOption.AsParameter));
}
WriteLine(">");
WriteLine(string.Format("struct {0}{1} {{",
Expand Down

0 comments on commit c12d4e7

Please sign in to comment.