[libcxx-commits] [PATCH] D102037: [libcxx][views] Add drop_view.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 21 16:28:27 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/include/__ranges/drop_view.h:41
+  template<view _View, bool = forward_range<_View>>
+  struct __cache_base {
+    iterator_t<_View> __cached_begin{};
----------------
cjdb wrote:
> `__cache_base` is a bit too general a name.
> I'm going to leave it at the top

Please do as @ldionne says, and follow libc++ style. Private/data members go at the bottom (and data members get a suffix-underscore; thanks for addressing that part already).
Also, please consider putting `__cached_begin_` in front of `__count_`, for layout reasons. It's more likely that `_View` begins with an `_Empty` member than that `_View::difference_type` does.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102037



More information about the libcxx-commits mailing list