[libcxx-commits] [PATCH] D102135: [libcxx][ranges] adds _`copyable-box`_

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 29 15:38:38 PDT 2021


zoecarver added inline comments.


================
Comment at: libcxx/include/__ranges/copyable_box.h:51
+  class __copyable_box {
+    std::optional<_Tp> __val_;
+
----------------
zoecarver wrote:
> zoecarver wrote:
> > `std::`
> Just curious: why is having a member better than inheriting? 
Ah, I see you already explained this: https://reviews.llvm.org/D102135#inline-994703

FWIW I don't find that too weird and wouldn't be opposed to inheriting here. Especially given this is an exposition only type. 

Either way works for me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102135



More information about the libcxx-commits mailing list