[libcxx-commits] [PATCH] D100216: [libc++] Split a few things out of <memory>
Marek Kurdej via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 9 12:21:00 PDT 2021
curdeius accepted this revision as: curdeius.
curdeius added a comment.
LGTM. I prefer having clearly cut headers. IMO it is better to have more than not enough. That's of course subjective.
BTW. Should I understand that we settled on __memory/* naming scheme?
================
Comment at: libcxx/include/__memory/temporary_buffer.h:29
+pair<_Tp*, ptrdiff_t>
+get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT
+{
----------------
ldionne wrote:
> curdeius wrote:
> > Sidenote, why isn't it guarded with ` #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_xyz)` like `auto_ptr`?
> I suspect this is simply an oversight, honestly. I think moving away from gigantic headers will make it easier to reason and spot this sort of stuff, too.
>
> Thinking twice, it may be that we're using `get_temporary_buffer()` to implement some algorithms so we can't actually remove it. Of course we could move to an internal name and stop providing the public name.
>
> I'm not changing any code whatsoever in this patch, just moving stuff around.
Indeed, it's used in`<algorithm>`.
https://github.com/llvm/llvm-project/blob/main/libcxx/include/algorithm#L3623
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100216/new/
https://reviews.llvm.org/D100216
More information about the libcxx-commits
mailing list