[libcxx-commits] [PATCH] D62259: shared_ptr changes from library fundamentals (P0414R2)

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 7 20:36:50 PDT 2020


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

In D62259#2026268 <https://reviews.llvm.org/D62259#2026268>, @zoecarver wrote:

> Thanks for the review :)
>
> @ldionne I think that's only the case for `operator[]`, not `get()`. In fact, in the paper, `get()` is used to implement `operator[]`. <https://eel.is/c++draft/smartptr#util.smartptr.shared.obs-9>


You are entirely right, I got confused by the code highlighting in the paper. Instead, it was:

  T* operator->() const noexcept;

Specifically, this bullet: http://wg21.link/util.smartptr.shared.obs#7.

If it makes sense to add a `static_assert` in `operator[]`, I think it makes sense to add the reverse `static_assert` in `operator->`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62259





More information about the libcxx-commits mailing list