//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // struct pointer_traits // { // typedef
element_type; // ... // }; #include #include struct A { typedef char element_type; }; template struct B { typedef char element_type; }; template struct C { }; template struct D { }; int main() { static_assert((std::is_same::element_type, char>::value), ""); static_assert((std::is_same >::element_type, char>::value), ""); static_assert((std::is_same >::element_type, int>::value), ""); static_assert((std::is_same >::element_type, double>::value), ""); }