[libcxx-commits] [PATCH] D130631: [libc++] Implement P0288R9 (move_only_function)
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Dec 19 12:11:21 PST 2022
ldionne added inline comments.
================
Comment at: libcxx/include/__functional/move_only_function_impl.h:74
+ using _BufferT = __small_buffer<__buffer_size_, __buffer_alignment_>;
+
+ using _TrivialVTable = _MoveOnlyFunctionTrivialVTable<_BufferT, _ReturnT, _ArgTypes...>;
----------------
I would add
```
// This is also a nice place to document how we're storing the vtable, i.e. explain that we're either pointing to a TrivialVTable or a non-trivial one based on the bool.
using _VTableStorage = __pointer_int_pair<const _TrivialVTable*, bool, bitfield_width(1)>;
```
================
Comment at: libcxx/include/__functional/move_only_function_impl.h:104
+
+ template <class _VT>
+ static constexpr bool __is_callable_from = [] {
----------------
Can you use a more descriptive name here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130631/new/
https://reviews.llvm.org/D130631
More information about the libcxx-commits
mailing list