[cfe-commits] [libcxx] r150887 - /libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
Howard Hinnant
hhinnant at apple.com
Sat Feb 18 12:12:03 PST 2012
Author: hhinnant
Date: Sat Feb 18 14:12:03 2012
New Revision: 150887
URL: http://llvm.org/viewvc/llvm-project?rev=150887&view=rev
Log:
Exercise rvalue arguements to make_shared for C++11 mode.
Modified:
libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
Modified: libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp?rev=150887&r1=150886&r2=150887&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp (original)
+++ libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp Sat Feb 18 14:12:03 2012
@@ -62,5 +62,16 @@
assert(p->get_int() == 67);
assert(p->get_char() == 'e');
}
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ nc = new_count;
+ {
+ char c = 'e';
+ std::shared_ptr<A> p = std::make_shared<A>(67, c);
+ assert(new_count == nc+1);
+ assert(A::count == 1);
+ assert(p->get_int() == 67);
+ assert(p->get_char() == 'e');
+ }
+#endif
assert(A::count == 0);
}
More information about the cfe-commits
mailing list