[libcxx-commits] [PATCH] D62103: Update shared_ptr tests to match the standard

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 6 18:35:04 PDT 2019


zoecarver marked an inline comment as done.
zoecarver added inline comments.


================
Comment at: test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp:27
+    {
+        std::shared_ptr<T> p {};
+        assert(p.use_count() == 0);
----------------
zoecarver wrote:
> mclow.lists wrote:
> > Why braces here? 
> > 
> > You might want to read up on the difference between default-initialization and value-initialization.
> > 
> This is to test that both work. 
This is the `default.pass.cpp` file. I see. Will remove. 


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

https://reviews.llvm.org/D62103





More information about the libcxx-commits mailing list