cor3ntin wrote: While I agree with you that we should be careful with you that `const_cast` is usually a bad thing, I am not sure removing const everywhere for one usage is a net-positive. There are no reason for template arguments to ever be modified. The forgot/remember exception is somewhat of a hack, and we might want to explore if we can improve _that_
A clean change would be to copy the whole MTAL and replace the "forgotten" argument. That might be worth benchmarking (references to `TemplateArgs` in `TemplateInstantiator` would have to be replaced by a function that return that copy, if any) But, I think I am content with the status quo, if we don't find a better option we should probably add comments. https://github.com/llvm/llvm-project/pull/104687 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits