From 68436a9b488b976f811dd2dc2c5dba078bd9427b Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Mon, 27 Jun 2016 01:02:43 +0000 Subject: Implement P0163r0. Add shared_ptr::weak_type. This patch adds the weak_type typedef in shared_ptr. It is available in C++17 and newer. This patch also updates the _LIBCPP_STD_VER and TEST_STD_VER macros to have the value of 16, since 2016 is the current year. llvm-svn: 273839 --- .../memory/util.smartptr/util.smartptr.shared/types.pass.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared') diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp index 8175312334f..f44c05eb7c8 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp @@ -13,14 +13,20 @@ // { // public: // typedef T element_type; +// typedef weak_ptr weak_type; // C++17 // ... // }; #include +#include "test_macros.h" + struct A; // purposefully incomplete int main() { static_assert((std::is_same::element_type, A>::value), ""); +#if TEST_STD_VER > 14 + static_assert((std::is_same::weak_type, std::weak_ptr>::value), ""); +#endif } -- cgit v1.2.3