fork download
  1. #include <iostream>
  2. #include <typeinfo>
  3. using namespace std;
  4.  
  5. int main() {
  6. typedef int& ref;
  7. cout << "typeid of int is: " << typeid(int).name() << endl;
  8. cout << "typeid of int& is: " << typeid(ref).name() << endl;
  9. cout << "typeid of (int&)& is: " << typeid(ref&).name() << endl;
  10. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
typeid of int is: i
typeid of int& is: i
typeid of (int&)& is: i