[libcxx-commits] [libcxx] [libc++] Fix naming of value template parameters (PR #76888)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 10 11:12:04 PST 2024
philnik777 wrote:
> > I don't think I change the style here. We don't have a consistent style for NTTPs in the code base currently. I don't care much either way, but your reasoning seems quite flawed here.
>
> I checked the `N` case before and `_Np` seems very common, so I'm not sure why my reasoning is flawed. The changes to the clang-format style would make `_Np` invalid, which I dislike since the Standard uses `N` quite often.
This doesn't make `_Np` invalid. It simply allows both forms, otherwise there would be a lot more cases that changed. IMO the reasoning is flawed because it isn't a change in our conventions. We simply never had any strict convention how to name NTTPs. While the `_[A-Z]p` version is more common, it is not the only one used.
> I have to agree with @mordante here, template parameters are always uppercase in libc++. We haven't been making a distinction whether the template parameter denotes a type or a value, [...].
This is simply wrong. We're using both versions in the code base. If this wasn't the case I wouldn't have to allow both.
https://github.com/llvm/llvm-project/pull/76888
More information about the libcxx-commits
mailing list