[PATCH] D129951: adds `__disable_adl` attribute
Louis Dionne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 8 15:00:14 PST 2023
ldionne added a comment.
This is a really neat attribute! FWIW, I think we would most likely have used it in `<ranges>` if it were available back then. Assuming that GCC implemented it, I think we could consider changing to use this attribute. However:
1. This would technically be an ABI break, but this is probably not an issue in practice since I doubt this would bite any user, ever. We'd still have to think about it more seriously.
2. This would definitely be a source break for users, since they wouldn't be able to pass niebloids around as function arguments anymore. This one, I suspect, might be a deal breaker depending on how many users have started depending on that. I suspect this means the ship might have sailed for libc++ to use it in existing code.
FWIW, my main thought is that I would like to see this proposed as a WG21 proposal. This might end up an attribute or something else, I'm not sure. But it would address the issue of not all implementations providing the functionality. IMO this patch and the data gathered in it would be a great motivation for WG21 to do something (I also know there are other proposals in this domain).
Note: For history, we stopped making niebloids non-copyable in D116570 <https://reviews.llvm.org/D116570>. We originally did, but then that created divergence with libstdc++ and meant that we had to distinguish between CPOs and Niebloids in a way that seemed a bit arbitrary, so instead we went for a straightforward implementation. It is technically not as strict as it could be, though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129951/new/
https://reviews.llvm.org/D129951
More information about the cfe-commits
mailing list