blob: 8721062c6d0258298a781a722925e9ebed0c389c [file] [log] [blame]
Howard Hinnantc52f43e2010-08-22 00:59:46 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantc52f43e2010-08-22 00:59:46 +00007//
8//===----------------------------------------------------------------------===//
9
10// <memory>
11
12// unique_ptr
13
14// Test unique_ptr::pointer type
15
16#include <memory>
17#include <type_traits>
18
19struct Deleter
20{
21 struct pointer {};
22};
23
24int main()
25{
26 {
27 typedef std::unique_ptr<int> P;
28 static_assert((std::is_same<P::pointer, int*>::value), "");
29 }
30 {
31 typedef std::unique_ptr<int, Deleter> P;
32 static_assert((std::is_same<P::pointer, Deleter::pointer>::value), "");
33 }
34}