[PATCH] D129951: adds `__disable_adl` attribute

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 15:04:47 PST 2023


ldionne added a comment.

In D129951#4179467 <https://reviews.llvm.org/D129951#4179467>, @cjdb wrote:

> I'm deeply disappointed that libc++ moved away from using `__function_like`: that was an important part of preventing niebloid misuse. It isn't conforming to treat niebloids as function objects, which is what `__function_like` prevented (I just checked `std::ranges::next` and it seems that `__function_like` was completely removed).

Oops, it seems like my reply got into a race condition with yours. I am curious though, why is it non-conforming to treat niebloids as function objects? It is certainly more lax than required by the Standard, however we are allowed to make those copyable, aren't we? Does the Standard say that we *have* to make them non-usable as objects? That would change things for sure (not with this patch, but we'd probably want to try re-introducing `__function_like`, and we'd file a bug report against libstdc++ to do the same).


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