diff --git a/wrap/Constructor.h b/wrap/Constructor.h index fd9e0d32c..adfcb8472 100644 --- a/wrap/Constructor.h +++ b/wrap/Constructor.h @@ -40,7 +40,7 @@ struct Constructor: public ArgumentOverloads { Constructor expandTemplate(const TemplateSubstitution& ts) const { Constructor inst = *this; inst.argLists_ = expandArgumentListsTemplate(ts); - inst.name = inst.name; + inst.name = ts.expandedClassName(); return inst; } diff --git a/wrap/TemplateSubstitution.h b/wrap/TemplateSubstitution.h index 4e9b43f3d..b20a1af6f 100644 --- a/wrap/TemplateSubstitution.h +++ b/wrap/TemplateSubstitution.h @@ -39,6 +39,10 @@ public: templateArg_(a), qualifiedType_(t), expandedClass_(e) { } + std::string expandedClassName() const { + return expandedClass_.name; + } + // Substitute if needed Qualified operator()(const Qualified& type) const { if (type.name == templateArg_ && type.namespaces.empty())