<div dir="ltr">That works! \o/</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 25, 2015 at 2:02 PM Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">================<br>
Comment at: lib/Sema/SemaTemplateInstantiate.cpp:2273-2297<br>
@@ -2272,27 +2274,27 @@<br>
<br>
// Check whether we have already instantiated or specialized this class<br>
// template specialization.<br>
if (ClassTemplateSpec->getSpecializationKind() != TSK_Undeclared) {<br>
if (ClassTemplateSpec->getSpecializationKind() ==<br>
TSK_ExplicitInstantiationDeclaration &&<br>
TSK == TSK_ExplicitInstantiationDefinition) {<br>
// An explicit instantiation definition follows an explicit instantiation<br>
// declaration (C++0x [temp.explicit]p10); go ahead and perform the<br>
// explicit instantiation.<br>
ClassTemplateSpec->setSpecializationKind(TSK);<br>
<br>
// If this is an explicit instantiation definition, mark the<br>
// vtable as used.<br>
if (TSK == TSK_ExplicitInstantiationDefinition &&<br>
!ClassTemplateSpec->isInvalidDecl())<br>
MarkVTableUsed(PointOfInstantiation, ClassTemplateSpec, true);<br>
<br>
return false;<br>
}<br>
<br>
// We can only instantiate something that hasn't already been<br>
// instantiated or specialized. Fail without any diagnostics: our<br>
// caller will provide an error message.<br>
return true;<br>
}<br>
<br>
----------------<br>
Better solution: just delete all of this code.<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10622&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=r0jAE7SYzEUEd1sdovP2hAjpHVyd_C3_EoeLbvPGLdE&s=IImzREDu3roIN-DKcC3wf0wNIlxpr5RsaDrnRK17JlE&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10622</a><br>
<br>
EMAIL PREFERENCES<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=r0jAE7SYzEUEd1sdovP2hAjpHVyd_C3_EoeLbvPGLdE&s=sQo-ngyobenCJNcesx6nmATeaSsXOnt2SnUo83UcccE&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>