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.
pr12937.diff
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
