1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class Ptr>
13 // struct pointer_traits
15 // static pointer pointer_to(<details>);
28 typedef T element_type;
31 A(element_type* t) : t_(t) {}
33 static A pointer_to(typename std::conditional<std::is_void<element_type>::value,
34 nat, element_type>::type& et)
42 A<int> a = std::pointer_traits<A<int> >::pointer_to(i);
46 (std::pointer_traits<A<void> >::element_type)0;