Details
- Reviewers
ldionne Mordante var-const - Group Reviewers
Restricted Project - Commits
- rG993a22eccaf7: [libc++] Simplify the char_traits specializations
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__string/char_traits.h | ||
---|---|---|
226 | Does this handle overlapping ranges? The old code does. https://eel.is/c++draft/char.traits.require says it has to handle overlapping ranges. |
libcxx/include/__string/char_traits.h | ||
---|---|---|
226 | While std::copy_n doesn't officially support overlapping ranges our implementation forwards trivial types to __builtin_memmove, which does handle them properly. |
libcxx/include/__string/char_traits.h | ||
---|---|---|
226 | Can you please add tests to cover that (or ensure we already do)? Also, if we keep this, let's add a comment like // our implementation of std::copy_n handles overlapping ranges. |
libcxx/include/__string/char_traits.h | ||
---|---|---|
545–548 | Don't we externally instantiate char_traits? This change would allow the compiler to instantiate and generate code in each TU for these functions. Maybe that's what we want, maybe that isn't. But we should consider it. |
libcxx/include/__string/char_traits.h | ||
---|---|---|
545–548 | All the functions are marked _LIBCPP_INLINE_VISIBILITY? Even if we had an extern template they wouldn't be part of it. |