fork download
  1. #include <iostream>
  2. #include <type_traits>
  3. #include <typeinfo>
  4.  
  5.  
  6. template< typename T >
  7. struct S
  8. {
  9. static void foo( ) {
  10. std::cout << typeid(T).name() << std::endl;
  11. std::cout << typeid( typename std::remove_const<T>::type ).name() << std::endl;
  12. }
  13. };
  14.  
  15.  
  16. int main( )
  17. {
  18. S<char const*>::foo();
  19. }
  20.  
Success #stdin #stdout 0s 2928KB
stdin
Standard input is empty
stdout
PKc
PKc