[cfe-commits] PR12937 - explicitly deleting an explicit template specialization

David Blaikie dblaikie at gmail.com
Thu Jun 21 15:14:16 PDT 2012


As per PR12937 Clang rejects valid code that attempts to explicitly
delete an explicit template specialization.

This is due to the way Clang represents explicit template
specializations as redeclarations of an implicit specialization of the
original function template.

The fix is a pretty vague workaround - I'm open to suggestions of how
to more deliberately test for the "magic" implicit declaration for an
explicit specialization but I couldn't find one - so for now I just
assume it's the first (getPreviousDecl() == nullptr) declaration of
any explicit specialization.

At some point it would be nice to clean up the AST to more accurately
represent the C++ semantics here so we don't have to do such hurdles.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr12937.diff
Type: application/octet-stream
Size: 1539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120621/fd316a4a/attachment.obj>


More information about the cfe-commits mailing list