[libcxx-commits] [PATCH] D63230: Add observer_ptr

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 12 15:30:25 PDT 2019


zoecarver created this revision.
zoecarver added reviewers: mclow.lists, EricWF, ldionne.
Herald added subscribers: libcxx-commits, dexonsmith.

This patch fixes 2516 <https://cplusplus.github.io/LWG/issue2516>. It also adds `observer_ptr` (n4282 <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4282.pdf>).

**Questions:**

- Is it okay to use `constexpr` and `noexcept` or should I use the macros?
- Should this use the experimental namespace? The paper made it seem like `std` was sufficient.
- I think there is something else I need to do when adding a header.
- The greater than operator seemed wrong.


Repository:
  rCXX libc++

https://reviews.llvm.org/D63230

Files:
  include/experimental/memory
  test/std/experimental/memory/memory.observer.ptr/conv.pass.cpp
  test/std/experimental/memory/memory.observer.ptr/ctor.pass.cpp
  test/std/experimental/memory/memory.observer.ptr/hash.pass.cpp
  test/std/experimental/memory/memory.observer.ptr/mod/release.pass.cpp
  test/std/experimental/memory/memory.observer.ptr/mod/reset.pass.cpp
  test/std/experimental/memory/memory.observer.ptr/mod/swap.pass.cpp
  test/std/experimental/memory/memory.observer.ptr/obs.pass.cpp
  test/std/experimental/memory/memory.observer.ptr/spec.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63230.204369.patch
Type: text/x-patch
Size: 19893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190612/f56896f3/attachment-0001.bin>


More information about the libcxx-commits mailing list