summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r--libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp6
1 files changed, 6 insertions, 0 deletions
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<T> weak_type; // C++17
// ...
// };
#include <memory>
+#include "test_macros.h"
+
struct A; // purposefully incomplete
int main()
{
static_assert((std::is_same<std::shared_ptr<A>::element_type, A>::value), "");
+#if TEST_STD_VER > 14
+ static_assert((std::is_same<std::shared_ptr<A>::weak_type, std::weak_ptr<A>>::value), "");
+#endif
}
OpenPOWER on IntegriCloud