1*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===// 2*0a6a1f1dSLionel Sambuc // 3*0a6a1f1dSLionel Sambuc // The LLVM Compiler Infrastructure 4*0a6a1f1dSLionel Sambuc // 5*0a6a1f1dSLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open 6*0a6a1f1dSLionel Sambuc // Source Licenses. See LICENSE.TXT for details. 7*0a6a1f1dSLionel Sambuc // 8*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===// 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc // <typeindex> 11*0a6a1f1dSLionel Sambuc 12*0a6a1f1dSLionel Sambuc // class type_index 13*0a6a1f1dSLionel Sambuc 14*0a6a1f1dSLionel Sambuc // const char* name() const; 15*0a6a1f1dSLionel Sambuc 16*0a6a1f1dSLionel Sambuc #include <typeindex> 17*0a6a1f1dSLionel Sambuc #include <string> 18*0a6a1f1dSLionel Sambuc #include <cassert> 19*0a6a1f1dSLionel Sambuc main()20*0a6a1f1dSLionel Sambucint main() 21*0a6a1f1dSLionel Sambuc { 22*0a6a1f1dSLionel Sambuc const std::type_info& ti = typeid(int); 23*0a6a1f1dSLionel Sambuc std::type_index t1 = typeid(int); 24*0a6a1f1dSLionel Sambuc assert(std::string(t1.name()) == ti.name()); 25*0a6a1f1dSLionel Sambuc } 26