[libcxx-commits] [libcxx] [libc++][RFC] Use type traits builtins directly in <type_traits> and <concepts> (PR #114840)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Nov 16 05:32:35 PST 2024
philnik777 wrote:
> Did you plan on drawing a line where the builtins should be used and where the normal `_v` type traits should be used? For example, using the builtins directly from within `__concepts/` and `__type_traits/`, but the libc++ API from everywhere else?
I think that is the line I'd want to draw, yes. I don't know whether we might want to extend it in the future, but so far that's not my plan.
> I don't want to unnecessarily make this into a policy discussion because I don't think it's important enough to mandate that, but at the same time this will lead to some inconsistencies unless we have something written down we can refer to.
I'll try to write something up.
> If the plan is to use builtins from anywhere in the codebase, I have some reservations about that because it might tie us a bit too closely to the specific compilers we support today. There's also other downsides like the inability to work around a compiler bug in a trait, which we've sometimes done in the libc++ version of the trait and has proven useful while we wait for the compiler to be fixed.
https://github.com/llvm/llvm-project/pull/114840
More information about the libcxx-commits
mailing list