[libcxx-commits] [PATCH] D128146: [libc++] Use uninitialized algorithms for vector
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 4 06:22:11 PDT 2022
philnik added a comment.
In D128146#3699228 <https://reviews.llvm.org/D128146#3699228>, @eaeltsin wrote:
> Thanks @philnik!
>
> The code is from `libzim` - https://github.com/openzim/libzim/blob/966f7b217e9bc36dc30be6d9e46d51a2bfb7091c/src/zim_types.h#L36 . It doesn't look nice to me, and there definitely are multiple ways to make it work.
>
> My question is more about the change in the compiler behavior when selecting the correct overloaded operator. Was the code clearly non standard-compliant before?
IIUC the code is not standards-compliant. For example it breaks https://godbolt.org/z/8jbqaY45b. I think http://eel.is/c++draft/constraints#namespace.std-7 is the interesting paragraph here, specifically `(a) the overload's declaration depends on at least one user-defined type`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128146/new/
https://reviews.llvm.org/D128146
More information about the libcxx-commits
mailing list