[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 29 07:32:35 PDT 2024
AaronBallman wrote:
> > > I did think about it more, and I think it would be more consistent to support the attribute on any sort of specializable entity, including functions - regardless of STL needs @AaronBallman @ldionne
> >
> >
> > Agreed; if we're adding a custom attribute, we might as well support it in a general form so users can also make use of it for their needs (which may be different than STL needs).
>
> While I don't see much of a use-case for functions, I also don't see much of a downside (assuming implementing the attribute is as simple for functions as it is for variables and classes). Is there anything else that can be specialized?
Classes, functions, variables
Enumerations... maybe... ish?: https://godbolt.org/z/78qn1hf8d
(https://en.cppreference.com/w/cpp/language/template_specialization)
https://github.com/llvm/llvm-project/pull/101469
More information about the cfe-commits
mailing list