#include <iostream>
#include <typeinfo>
#include <limits>

using std::cout;
using std::endl;
using std::numeric_limits;
using std::cerr;

int main() {
   auto i = 2147483647L /* numeric_limits<int>::max() */ ;
   cout << "The type of i is " << typeid(i).name() << endl;

   int count = 0;
   for (auto i = 2147483647L; 
        i < 2147483657L /* numeric_limits<int>::max() + 10 */ ; ++i) {
       cout << "i = " << i << " " << endl;

       if (count > 30) {
           cerr << "Too many loops." << endl;
           break;
       }
       ++count;
   }

   return 0;
}