[cfe-dev] Remove explicit template specializations

Douglas Gregor dgregor at apple.com
Wed Mar 2 09:50:32 PST 2011


On Mar 2, 2011, at 9:39 AM, Vassil Vassilev wrote:

> Hi all,
>   I am wondering if there is a way to remove existing explicit class 
> template specialization declaration? I cannot remove it like 
> Decl->getDeclContext()->removeDecl(Decl)..
>   I know that in ClassTemplateDecl there is addSpecialization() and no 
> removeSpecialization(). Is it complex to implement removeSpecialization()?

It is *extremely* complex to remove a specialization, since you would have to walk the entire AST to determine if anything in the AST references the specialization.

	- Doug





More information about the cfe-dev mailing list