[libcxx-commits] [PATCH] D134943: [libc++] Fix ADL for `make_error_{code, condition}`
Jonathan Wakely via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 30 02:53:27 PDT 2022
jwakely created this revision.
jwakely added a reviewer: libc++.
Herald added a project: All.
jwakely requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
Implement LWG 3629, by making lookup for make_error_code and
make_error_condition only consider names found by ADL. This is achieved
by adding a block scope using-declaration for a function that will be
found by unqualified lookup, preventing unqualified lookup from
continuing to enclosing scopes (the class scope, then enclosing
namespaces). The function names by the using declaration is not viable,
so overload resolution must select a candidate found by ADL.
I imagine you might want to rename namespace __lwg3629 to something
else. For libstdc++ I used "__adl_only".
This fixes https://github.com/llvm/llvm-project/issues/57614
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134943
Files:
libcxx/include/system_error
libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.constructors/lwg3629.pass.cpp
libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.modifiers/lwg3629.pass.cpp
libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.constructors/lwg3629.pass.cpp
libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.modifiers/lwg3629.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134943.464194.patch
Type: text/x-patch
Size: 8309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220930/3dfb1d73/attachment.bin>
More information about the libcxx-commits
mailing list