fork download
  1. #include <iostream>
  2. #include <type_traits>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. cout << boolalpha;
  8.  
  9. cout << sizeof(const char *) << endl;
  10. cout << sizeof("123456789") << endl;
  11. cout << is_same<decltype("123456789"), const char (&)[10]>::value << endl;
  12. cout << is_same<decltype("123456789"), char (&)[10]>::value << endl;
  13.  
  14. int mass[10];
  15. cout << is_same<decltype(mass), int [10]>::value << endl;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
8
10
true
false
true