[libcxx-commits] [libcxx] [libc++][RFC] Use type traits builtins directly in <type_traits> and <concepts> (PR #114840)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 8 08:31:04 PST 2025
https://github.com/ldionne requested changes to this pull request.
I like this change a bit more now that you've added a section to the coding guidelines, but I still don't like it much. I think it increases the maintenance burden of the library and will lead to more inconsistency in the codebase (esp. for newcommers), and it's difficult to quantify how much impact this truly has on real world code.
FWIW, if (for example) we had a single header implementing all of `type_traits`, and we wanted to use builtins directly inside that header (and that header only), I'd have much less of a problem. We could have a fat comment at the top of that header explaining why we're using builtins throughout that file. But that property would be very local to that header only, so there would be less risk of introducing inconsistencies as the codebase evolves.
Given https://github.com/llvm/llvm-project/issues/121278, we also probably don't want to merge this right now anyway. I would suggest we re-evaluate this change again in the future based on what `type_traits` looks like then.
https://github.com/llvm/llvm-project/pull/114840
More information about the libcxx-commits
mailing list