THRIFT-920. cpp: C++ Test and Tutorial does not compile anymore due to the change within Enum handling

Patch: Roger Meier and Christian Lavoie

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001826 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp
index 83454dc..d6063ac 100644
--- a/test/cpp/src/TestServer.cpp
+++ b/test/cpp/src/TestServer.cpp
@@ -138,7 +138,7 @@
     out = thing;
   }
 
-  Numberz testEnum(const Numberz thing) {
+  Numberz::type testEnum(const Numberz::type thing) {
     printf("testEnum(%d)\n", thing);
     return thing;
   }
@@ -163,7 +163,7 @@
 
   }
 
-  void testInsanity(map<UserId, map<Numberz,Insanity> > &insane, const Insanity &argument) {
+  void testInsanity(map<UserId, map<Numberz::type,Insanity> > &insane, const Insanity &argument) {
     printf("testInsanity()\n");
 
     Xtruct hello;
@@ -179,36 +179,36 @@
     goodbye.i64_thing = 4;
 
     Insanity crazy;
-    crazy.userMap.insert(make_pair(EIGHT, 8));
+    crazy.userMap.insert(make_pair(Numberz::EIGHT, 8));
     crazy.xtructs.push_back(goodbye);
 
     Insanity looney;
-    crazy.userMap.insert(make_pair(FIVE, 5));
+    crazy.userMap.insert(make_pair(Numberz::FIVE, 5));
     crazy.xtructs.push_back(hello);
 
-    map<Numberz, Insanity> first_map;
-    map<Numberz, Insanity> second_map;
+    map<Numberz::type, Insanity> first_map;
+    map<Numberz::type, Insanity> second_map;
 
-    first_map.insert(make_pair(TWO, crazy));
-    first_map.insert(make_pair(THREE, crazy));
+    first_map.insert(make_pair(Numberz::TWO, crazy));
+    first_map.insert(make_pair(Numberz::THREE, crazy));
 
-    second_map.insert(make_pair(SIX, looney));
+    second_map.insert(make_pair(Numberz::SIX, looney));
 
     insane.insert(make_pair(1, first_map));
     insane.insert(make_pair(2, second_map));
 
     printf("return");
     printf(" = {");
-    map<UserId, map<Numberz,Insanity> >::const_iterator i_iter;
+    map<UserId, map<Numberz::type,Insanity> >::const_iterator i_iter;
     for (i_iter = insane.begin(); i_iter != insane.end(); ++i_iter) {
       printf("%"PRId64" => {", i_iter->first);
-      map<Numberz,Insanity>::const_iterator i2_iter;
+      map<Numberz::type,Insanity>::const_iterator i2_iter;
       for (i2_iter = i_iter->second.begin();
            i2_iter != i_iter->second.end();
            ++i2_iter) {
         printf("%d => {", i2_iter->first);
-        map<Numberz, UserId> userMap = i2_iter->second.userMap;
-        map<Numberz, UserId>::const_iterator um;
+        map<Numberz::type, UserId> userMap = i2_iter->second.userMap;
+        map<Numberz::type, UserId>::const_iterator um;
         printf("{");
         for (um = userMap.begin(); um != userMap.end(); ++um) {
           printf("%d => %"PRId64", ", um->first, um->second);
@@ -232,7 +232,7 @@
 
   }
 
-  void testMulti(Xtruct &hello, const int8_t arg0, const int32_t arg1, const int64_t arg2, const std::map<int16_t, std::string>  &arg3, const Numberz arg4, const UserId arg5) {
+  void testMulti(Xtruct &hello, const int8_t arg0, const int32_t arg1, const int64_t arg2, const std::map<int16_t, std::string>  &arg3, const Numberz::type arg4, const UserId arg5) {
     printf("testMulti()\n");
 
     hello.string_thing = "Hello2";
@@ -353,7 +353,7 @@
     if (!args["workers"].empty()) {
       workerCount = atoi(args["workers"].c_str());
     }
-  } catch (exception& e) {
+  } catch (std::exception& e) {
     cerr << e.what() << endl;
     cerr << usage;
   }