[libcxx-commits] [PATCH] D92776: [libc++] ADL-proof <algorithm> by adding _VSTD:: qualification on calls.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 7 18:55:56 PST 2020


Quuxplusone updated this revision to Diff 310072.
Quuxplusone added a comment.

[libc++] Include <cstring> and <cwchar> in <__string>.

  
  We seem to be getting lucky that <memory> includes <iterator>
  includes <iosfwd> includes <wchar.h>. This gives us the global-namespace
  `wmemmove`, but not `_VSTD::wmemmove`.

[libc++] Include C++ headers, not C headers, in <charconv>.

  
  This matches how libc++ does it in all the other headers.
  The only header that includes <string.h> is <cstring>.
  We need to include <cstring> if we want to use `_VSTD::memmove`
  instead of ADL or global-namespace `memmove`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92776/new/

https://reviews.llvm.org/D92776

Files:
  libcxx/include/__hash_table
  libcxx/include/__locale
  libcxx/include/__string
  libcxx/include/algorithm
  libcxx/include/atomic
  libcxx/include/charconv
  libcxx/include/fstream
  libcxx/include/iterator
  libcxx/include/list
  libcxx/include/locale
  libcxx/include/string
  libcxx/include/strstream
  libcxx/include/vector
  libcxx/test/std/algorithms/robust_against_adl.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92776.310072.patch
Type: text/x-patch
Size: 57303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201208/f7f60f3b/attachment-0001.bin>


More information about the libcxx-commits mailing list