Removed using statements from common.h

These statements pulled a bunch of symbols from the std namespace into
the global namespace. This commit removes all of them except for
std::string, which is a bit trickier to remove.
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 1f6d748..7c45fe7 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -226,7 +226,7 @@
 
 // Add the paths where google/protobuf/descriptor.proto and other well-known
 // type protos are installed.
-void AddDefaultProtoPaths(vector<pair<string, string> >* paths) {
+void AddDefaultProtoPaths(std::vector<std::pair<string, string> >* paths) {
   // TODO(xiaofeng): The code currently only checks relative paths of where
   // the protoc binary is installed. We probably should make it handle more
   // cases than that.
@@ -242,12 +242,12 @@
   path = path.substr(0, pos);
   // Check the binary's directory.
   if (IsInstalledProtoPath(path)) {
-    paths->push_back(pair<string, string>("", path));
+    paths->push_back(std::pair<string, string>("", path));
     return;
   }
   // Check if there is an include subdirectory.
   if (IsInstalledProtoPath(path + "/include")) {
-    paths->push_back(pair<string, string>("", path + "/include"));
+    paths->push_back(std::pair<string, string>("", path + "/include"));
     return;
   }
   // Check if the upper level directory has an "include" subdirectory.
@@ -257,7 +257,7 @@
   }
   path = path.substr(0, pos);
   if (IsInstalledProtoPath(path + "/include")) {
-    paths->push_back(pair<string, string>("", path + "/include"));
+    paths->push_back(std::pair<string, string>("", path + "/include"));
     return;
   }
 }
diff --git a/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc b/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
index 636a76a..a21dc0a 100644
--- a/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
@@ -56,7 +56,7 @@
     // node of a summary element, not part of an attribute.
     comments = StringReplace(comments, "&", "&amp;", true);
     comments = StringReplace(comments, "<", "&lt;", true);
-    vector<string> lines = Split(comments, "\n", false /* skip_empty */);
+    std::vector<string> lines = Split(comments, "\n", false /* skip_empty */);
     // TODO: We really should work out which part to put in the summary and which to put in the remarks...
     // but that needs to be part of a bigger effort to understand the markdown better anyway.
     printer->Print("/// <summary>\n");
diff --git a/src/google/protobuf/compiler/csharp/csharp_generator.cc b/src/google/protobuf/compiler/csharp/csharp_generator.cc
index c13ed65..5418127 100644
--- a/src/google/protobuf/compiler/csharp/csharp_generator.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_generator.cc
@@ -64,7 +64,7 @@
     GeneratorContext* generator_context,
     string* error) const {
 
-  vector<pair<string, string> > options;
+  std::vector<std::pair<string, string> > options;
   ParseGeneratorParameter(parameter, &options);
 
   // We only support proto3 - but we make an exception for descriptor.proto.
diff --git a/src/google/protobuf/compiler/javanano/javanano_enum.h b/src/google/protobuf/compiler/javanano/javanano_enum.h
index 10dd364..82e098f 100644
--- a/src/google/protobuf/compiler/javanano/javanano_enum.h
+++ b/src/google/protobuf/compiler/javanano/javanano_enum.h
@@ -68,13 +68,13 @@
   // considered equivalent.  We treat the first defined constant for any
   // given numeric value as "canonical" and the rest as aliases of that
   // canonical value.
-  vector<const EnumValueDescriptor*> canonical_values_;
+  std::vector<const EnumValueDescriptor*> canonical_values_;
 
   struct Alias {
     const EnumValueDescriptor* value;
     const EnumValueDescriptor* canonical_value;
   };
-  vector<Alias> aliases_;
+  std::vector<Alias> aliases_;
 
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
 };
diff --git a/src/google/protobuf/compiler/javanano/javanano_enum_field.cc b/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
index 26bc7f8..ea67a81 100644
--- a/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
@@ -83,7 +83,7 @@
 }
 
 void LoadEnumValues(const Params& params,
-    const EnumDescriptor* enum_descriptor, vector<string>* canonical_values) {
+    const EnumDescriptor* enum_descriptor, std::vector<string>* canonical_values) {
   string enum_class_name = ClassName(params, enum_descriptor);
   for (int i = 0; i < enum_descriptor->value_count(); i++) {
     const EnumValueDescriptor* value = enum_descriptor->value(i);
@@ -97,7 +97,7 @@
 }
 
 void PrintCaseLabels(
-    io::Printer* printer, const vector<string>& canonical_values) {
+    io::Printer* printer, const std::vector<string>& canonical_values) {
   for (int i = 0; i < canonical_values.size(); i++) {
     printer->Print(
       "  case $value$:\n",
diff --git a/src/google/protobuf/compiler/javanano/javanano_enum_field.h b/src/google/protobuf/compiler/javanano/javanano_enum_field.h
index 1be25d1..8cd0e24 100644
--- a/src/google/protobuf/compiler/javanano/javanano_enum_field.h
+++ b/src/google/protobuf/compiler/javanano/javanano_enum_field.h
@@ -63,7 +63,7 @@
  private:
   const FieldDescriptor* descriptor_;
   std::map<string, string> variables_;
-  vector<string> canonical_values_;
+  std::vector<string> canonical_values_;
 
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
 };
@@ -86,7 +86,7 @@
  private:
   const FieldDescriptor* descriptor_;
   std::map<string, string> variables_;
-  vector<string> canonical_values_;
+  std::vector<string> canonical_values_;
 
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AccessorEnumFieldGenerator);
 };
@@ -113,7 +113,7 @@
 
   const FieldDescriptor* descriptor_;
   std::map<string, string> variables_;
-  vector<string> canonical_values_;
+  std::vector<string> canonical_values_;
 
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator);
 };
diff --git a/src/google/protobuf/compiler/javanano/javanano_file.cc b/src/google/protobuf/compiler/javanano/javanano_file.cc
index 17f7386..7a661a4 100644
--- a/src/google/protobuf/compiler/javanano/javanano_file.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_file.cc
@@ -59,7 +59,7 @@
   // We conservatively assume that unknown fields are extensions.
   if (reflection->GetUnknownFields(message).field_count() > 0) return true;
 
-  vector<const FieldDescriptor*> fields;
+  std::vector<const FieldDescriptor*> fields;
   reflection->ListFields(message, &fields);
 
   for (int i = 0; i < fields.size(); i++) {
@@ -216,7 +216,7 @@
                             const string& java_package,
                             const DescriptorClass* descriptor,
                             GeneratorContext* output_directory,
-                            vector<string>* file_list,
+                            std::vector<string>* file_list,
                             const Params& params) {
   string filename = package_dir + descriptor->name() + ".java";
   file_list->push_back(filename);
@@ -239,7 +239,7 @@
 
 void FileGenerator::GenerateSiblings(const string& package_dir,
                                      GeneratorContext* output_directory,
-                                     vector<string>* file_list) {
+                                     std::vector<string>* file_list) {
   if (params_.java_multiple_files(file_->name())) {
     for (int i = 0; i < file_->message_type_count(); i++) {
       GenerateSibling<MessageGenerator>(package_dir, java_package_,
diff --git a/src/google/protobuf/compiler/javanano/javanano_file.h b/src/google/protobuf/compiler/javanano/javanano_file.h
index 217eafe..4ad3868 100644
--- a/src/google/protobuf/compiler/javanano/javanano_file.h
+++ b/src/google/protobuf/compiler/javanano/javanano_file.h
@@ -72,7 +72,7 @@
   // service type).
   void GenerateSiblings(const string& package_dir,
                         GeneratorContext* output_directory,
-                        vector<string>* file_list);
+                        std::vector<string>* file_list);
 
   const string& java_package() { return java_package_; }
   const string& classname()    { return classname_;    }
diff --git a/src/google/protobuf/compiler/javanano/javanano_generator.cc b/src/google/protobuf/compiler/javanano/javanano_generator.cc
index 7c3a042..fd7151b 100644
--- a/src/google/protobuf/compiler/javanano/javanano_generator.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_generator.cc
@@ -94,7 +94,7 @@
                              const string& parameter,
                              GeneratorContext* output_directory,
                              string* error) const {
-  vector<pair<string, string> > options;
+  std::vector<std::pair<string, string> > options;
 
   ParseGeneratorParameter(parameter, &options);
 
@@ -116,24 +116,24 @@
     if (option_name == "output_list_file") {
       output_list_file = option_value;
     } else if (option_name == "java_package") {
-        vector<string> parts;
-        SplitStringUsing(option_value, "|", &parts);
-        if (parts.size() != 2) {
-          *error = "Bad java_package, expecting filename|PackageName found '"
-            + option_value + "'";
-          return false;
-        }
-        params.set_java_package(parts[0], parts[1]);
+      std::vector<string> parts;
+      SplitStringUsing(option_value, "|", &parts);
+      if (parts.size() != 2) {
+        *error = "Bad java_package, expecting filename|PackageName found '"
+          + option_value + "'";
+        return false;
+      }
+      params.set_java_package(parts[0], parts[1]);
     } else if (option_name == "java_outer_classname") {
-        vector<string> parts;
-        SplitStringUsing(option_value, "|", &parts);
-        if (parts.size() != 2) {
-          *error = "Bad java_outer_classname, "
-                   "expecting filename|ClassName found '"
-                   + option_value + "'";
-          return false;
-        }
-        params.set_java_outer_classname(parts[0], parts[1]);
+      std::vector<string> parts;
+      SplitStringUsing(option_value, "|", &parts);
+      if (parts.size() != 2) {
+        *error = "Bad java_outer_classname, "
+                 "expecting filename|ClassName found '"
+                 + option_value + "'";
+        return false;
+      }
+      params.set_java_outer_classname(parts[0], parts[1]);
     } else if (option_name == "store_unknown_fields") {
       params.set_store_unknown_fields(option_value == "true");
     } else if (option_name == "java_multiple_files") {
@@ -191,7 +191,7 @@
     StringReplace(file_generator.java_package(), ".", "/", true);
   if (!package_dir.empty()) package_dir += "/";
 
-  vector<string> all_files;
+  std::vector<string> all_files;
 
   if (IsOuterClassNeeded(params, file)) {
     string java_filename = package_dir;
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_enum.h b/src/google/protobuf/compiler/objectivec/objectivec_enum.h
index 0b41cf7..f52e9e6 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_enum.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_enum.h
@@ -59,8 +59,8 @@
 
  private:
   const EnumDescriptor* descriptor_;
-  vector<const EnumValueDescriptor*> base_values_;
-  vector<const EnumValueDescriptor*> all_values_;
+  std::vector<const EnumValueDescriptor*> base_values_;
+  std::vector<const EnumValueDescriptor*> all_values_;
   const string name_;
 
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_file.cc b/src/google/protobuf/compiler/objectivec/objectivec_file.cc
index a249c71..6f80a0d 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_file.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_file.cc
@@ -116,9 +116,9 @@
 // deps as visited and prunes them from the needed files list.
 void PruneFileAndDepsMarkingAsVisited(
     const FileDescriptor* file,
-    vector<const FileDescriptor*>* files,
+    std::vector<const FileDescriptor*>* files,
     std::set<const FileDescriptor*>* files_visited) {
-  vector<const FileDescriptor*>::iterator iter =
+  std::vector<const FileDescriptor*>::iterator iter =
       std::find(files->begin(), files->end(), file);
   if (iter != files->end()) {
     files->erase(iter);
@@ -132,7 +132,7 @@
 // Helper for CollectMinimalFileDepsContainingExtensions.
 void CollectMinimalFileDepsContainingExtensionsWorker(
     const FileDescriptor* file,
-    vector<const FileDescriptor*>* files,
+    std::vector<const FileDescriptor*>* files,
     std::set<const FileDescriptor*>* files_visited) {
   if (files_visited->find(file) != files_visited->end()) {
     return;
@@ -165,7 +165,7 @@
 // specifically).
 void CollectMinimalFileDepsContainingExtensions(
     const FileDescriptor* file,
-    vector<const FileDescriptor*>* files) {
+    std::vector<const FileDescriptor*>* files) {
   std::set<const FileDescriptor*> files_visited;
   for (int i = 0; i < file->dependency_count(); i++) {
     const FileDescriptor* dep = file->dependency(i);
@@ -258,7 +258,7 @@
       "\n");
 
   std::set<string> fwd_decls;
-  for (vector<MessageGenerator *>::iterator iter = message_generators_.begin();
+  for (std::vector<MessageGenerator *>::iterator iter = message_generators_.begin();
        iter != message_generators_.end(); ++iter) {
     (*iter)->DetermineForwardDeclarations(&fwd_decls);
   }
@@ -275,12 +275,12 @@
       "\n");
 
   // need to write out all enums first
-  for (vector<EnumGenerator *>::iterator iter = enum_generators_.begin();
+  for (std::vector<EnumGenerator *>::iterator iter = enum_generators_.begin();
        iter != enum_generators_.end(); ++iter) {
     (*iter)->GenerateHeader(printer);
   }
 
-  for (vector<MessageGenerator *>::iterator iter = message_generators_.begin();
+  for (std::vector<MessageGenerator *>::iterator iter = message_generators_.begin();
        iter != message_generators_.end(); ++iter) {
     (*iter)->GenerateEnumHeader(printer);
   }
@@ -311,7 +311,7 @@
         "@interface $root_class_name$ (DynamicMethods)\n",
         "root_class_name", root_class_name_);
 
-    for (vector<ExtensionGenerator *>::iterator iter =
+    for (std::vector<ExtensionGenerator *>::iterator iter =
              extension_generators_.begin();
          iter != extension_generators_.end(); ++iter) {
       (*iter)->GenerateMembersHeader(printer);
@@ -320,7 +320,7 @@
     printer->Print("@end\n\n");
   }  // extension_generators_.size() > 0
 
-  for (vector<MessageGenerator *>::iterator iter = message_generators_.begin();
+  for (std::vector<MessageGenerator *>::iterator iter = message_generators_.begin();
        iter != message_generators_.end(); ++iter) {
     (*iter)->GenerateMessageHeader(printer);
   }
@@ -346,7 +346,7 @@
         "\n");
   }
 
-  vector<const FileDescriptor*> deps_with_extensions;
+  std::vector<const FileDescriptor*> deps_with_extensions;
   CollectMinimalFileDepsContainingExtensions(file_, &deps_with_extensions);
 
   {
@@ -376,7 +376,7 @@
     // imported so it can get merged into the root's extensions registry.
     // See the Note by CollectMinimalFileDepsContainingExtensions before
     // changing this.
-    for (vector<const FileDescriptor *>::iterator iter =
+    for (std::vector<const FileDescriptor *>::iterator iter =
              deps_with_extensions.begin();
          iter != deps_with_extensions.end(); ++iter) {
       if (!IsDirectDependency(*iter, file_)) {
@@ -388,7 +388,7 @@
   }
 
   bool includes_oneof = false;
-  for (vector<MessageGenerator *>::iterator iter = message_generators_.begin();
+  for (std::vector<MessageGenerator *>::iterator iter = message_generators_.begin();
        iter != message_generators_.end(); ++iter) {
     if ((*iter)->IncludesOneOfDefinition()) {
       includes_oneof = true;
@@ -441,12 +441,12 @@
       printer->Print(
           "static GPBExtensionDescription descriptions[] = {\n");
       printer->Indent();
-      for (vector<ExtensionGenerator *>::iterator iter =
+      for (std::vector<ExtensionGenerator *>::iterator iter =
                extension_generators_.begin();
            iter != extension_generators_.end(); ++iter) {
         (*iter)->GenerateStaticVariablesInitialization(printer);
       }
-      for (vector<MessageGenerator *>::iterator iter =
+      for (std::vector<MessageGenerator *>::iterator iter =
                message_generators_.begin();
            iter != message_generators_.end(); ++iter) {
         (*iter)->GenerateStaticVariablesInitialization(printer);
@@ -470,7 +470,7 @@
     } else {
       printer->Print(
           "// Merge in the imports (direct or indirect) that defined extensions.\n");
-      for (vector<const FileDescriptor *>::iterator iter =
+      for (std::vector<const FileDescriptor *>::iterator iter =
                deps_with_extensions.begin();
            iter != deps_with_extensions.end(); ++iter) {
         const string root_class_name(FileClassName((*iter)));
@@ -546,11 +546,11 @@
         "\n");
   }
 
-  for (vector<EnumGenerator *>::iterator iter = enum_generators_.begin();
+  for (std::vector<EnumGenerator *>::iterator iter = enum_generators_.begin();
        iter != enum_generators_.end(); ++iter) {
     (*iter)->GenerateSource(printer);
   }
-  for (vector<MessageGenerator *>::iterator iter = message_generators_.begin();
+  for (std::vector<MessageGenerator *>::iterator iter = message_generators_.begin();
        iter != message_generators_.end(); ++iter) {
     (*iter)->GenerateSource(printer);
   }
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_file.h b/src/google/protobuf/compiler/objectivec/objectivec_file.h
index a60a688..9c3f007 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_file.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_file.h
@@ -67,9 +67,9 @@
   const FileDescriptor* file_;
   string root_class_name_;
 
-  vector<EnumGenerator*> enum_generators_;
-  vector<MessageGenerator*> message_generators_;
-  vector<ExtensionGenerator*> extension_generators_;
+  std::vector<EnumGenerator*> enum_generators_;
+  std::vector<MessageGenerator*> message_generators_;
+  std::vector<ExtensionGenerator*> extension_generators_;
 
   const Options options_;
 
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_generator.cc b/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
index 3640746..760ff48 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
@@ -57,7 +57,7 @@
   return false;
 }
 
-bool ObjectiveCGenerator::GenerateAll(const vector<const FileDescriptor*>& files,
+bool ObjectiveCGenerator::GenerateAll(const std::vector<const FileDescriptor*>& files,
                                       const string& parameter,
                                       GeneratorContext* context,
                                       string* error) const {
@@ -71,7 +71,7 @@
 
   Options generation_options;
 
-  vector<pair<string, string> > options;
+  std::vector<std::pair<string, string> > options;
   ParseGeneratorParameter(parameter, &options);
   for (int i = 0; i < options.size(); i++) {
     if (options[i].first == "expected_prefixes_path") {
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_generator.h b/src/google/protobuf/compiler/objectivec/objectivec_generator.h
index b172331..3e43f73 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_generator.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_generator.h
@@ -56,7 +56,7 @@
                 const string& parameter,
                 GeneratorContext* context,
                 string* error) const;
-  bool GenerateAll(const vector<const FileDescriptor*>& files,
+  bool GenerateAll(const std::vector<const FileDescriptor*>& files,
                    const string& parameter,
                    GeneratorContext* context,
                    string* error) const;
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
index 14715ef..336311c 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
@@ -100,7 +100,7 @@
 // Do not expose this outside of helpers, stick to having functions for specific
 // cases (ClassName(), FieldName()), so there is always consistent suffix rules.
 string UnderscoresToCamelCase(const string& input, bool first_capitalized) {
-  vector<string> values;
+  std::vector<string> values;
   string current;
 
   bool last_char_was_number = false;
@@ -141,7 +141,7 @@
 
   string result;
   bool first_segment_forces_upper = false;
-  for (vector<string>::iterator i = values.begin(); i != values.end(); ++i) {
+  for (std::vector<string>::iterator i = values.begin(); i != values.end(); ++i) {
     string value = *i;
     bool all_upper = (kUpperSegments.count(value) > 0);
     if (all_upper && (result.length() == 0)) {
@@ -864,7 +864,7 @@
 }
 
 string BuildFlagsString(const FlagType flag_type,
-                        const vector<string>& strings) {
+                        const std::vector<string>& strings) {
   if (strings.size() == 0) {
     return GetZeroEnumNameForFlagType(flag_type);
   } else if (strings.size() == 1) {
@@ -886,7 +886,7 @@
   const string& comments = location.leading_comments.empty()
                                ? location.trailing_comments
                                : location.leading_comments;
-  vector<string> lines;
+  std::vector<string> lines;
   SplitStringAllowEmpty(comments, "\n", &lines);
   while (!lines.empty() && lines.back().empty()) {
     lines.pop_back();
@@ -1156,7 +1156,7 @@
 
 }  // namespace
 
-bool ValidateObjCClassPrefixes(const vector<const FileDescriptor*>& files,
+bool ValidateObjCClassPrefixes(const std::vector<const FileDescriptor*>& files,
                                const Options& generation_options,
                                string* out_error) {
   // Load the expected package prefixes, if available, to validate against.
@@ -1187,7 +1187,7 @@
 void TextFormatDecodeData::AddString(int32 key,
                                      const string& input_for_decode,
                                      const string& desired_output) {
-  for (vector<DataEntry>::const_iterator i = entries_.begin();
+  for (std::vector<DataEntry>::const_iterator i = entries_.begin();
        i != entries_.end(); ++i) {
     if (i->first == key) {
       std::cerr << "error: duplicate key (" << key
@@ -1211,7 +1211,7 @@
     io::CodedOutputStream output_stream(&data_outputstream);
 
     output_stream.WriteVarint32(num_entries());
-    for (vector<DataEntry>::const_iterator i = entries_.begin();
+    for (std::vector<DataEntry>::const_iterator i = entries_.begin();
          i != entries_.end(); ++i) {
       output_stream.WriteVarint32(i->first);
       output_stream.WriteString(i->second);
@@ -1561,7 +1561,7 @@
     printer->Print(
         "#if $cpp_symbol$\n",
         "cpp_symbol", cpp_symbol);
-    for (vector<string>::const_iterator iter = protobuf_framework_imports_.begin();
+    for (std::vector<string>::const_iterator iter = protobuf_framework_imports_.begin();
          iter != protobuf_framework_imports_.end(); ++iter) {
       printer->Print(
           " #import <$framework_name$/$header$>\n",
@@ -1570,7 +1570,7 @@
     }
     printer->Print(
         "#else\n");
-    for (vector<string>::const_iterator iter = protobuf_non_framework_imports_.begin();
+    for (std::vector<string>::const_iterator iter = protobuf_non_framework_imports_.begin();
          iter != protobuf_non_framework_imports_.end(); ++iter) {
       printer->Print(
           " #import \"$header$\"\n",
@@ -1587,7 +1587,7 @@
       printer->Print("\n");
     }
 
-    for (vector<string>::const_iterator iter = other_framework_imports_.begin();
+    for (std::vector<string>::const_iterator iter = other_framework_imports_.begin();
          iter != other_framework_imports_.end(); ++iter) {
       printer->Print(
           " #import <$header$>\n",
@@ -1602,7 +1602,7 @@
       printer->Print("\n");
     }
 
-    for (vector<string>::const_iterator iter = other_imports_.begin();
+    for (std::vector<string>::const_iterator iter = other_imports_.begin();
          iter != other_imports_.end(); ++iter) {
       printer->Print(
           " #import \"$header$\"\n",
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
index daea760..f74607c 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
@@ -190,7 +190,7 @@
 string LIBPROTOC_EXPORT DefaultValue(const FieldDescriptor* field);
 bool LIBPROTOC_EXPORT HasNonZeroDefaultValue(const FieldDescriptor* field);
 
-string LIBPROTOC_EXPORT BuildFlagsString(const FlagType type, const vector<string>& strings);
+string LIBPROTOC_EXPORT BuildFlagsString(const FlagType type, const std::vector<string>& strings);
 
 // Builds HeaderDoc/appledoc style comments out of the comments in the .proto
 // file.
@@ -210,7 +210,7 @@
 // Checks the prefix for the given files and outputs any warnings as needed. If
 // there are flat out errors, then out_error is filled in with the first error
 // and the result is false.
-bool LIBPROTOC_EXPORT ValidateObjCClassPrefixes(const vector<const FileDescriptor*>& files,
+bool LIBPROTOC_EXPORT ValidateObjCClassPrefixes(const std::vector<const FileDescriptor*>& files,
                                const Options& generation_options,
                                string* out_error);
 
@@ -233,7 +233,7 @@
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TextFormatDecodeData);
 
   typedef std::pair<int32, string> DataEntry;
-  vector<DataEntry> entries_;
+  std::vector<DataEntry> entries_;
 };
 
 // Helper for parsing simple files.
@@ -278,10 +278,10 @@
   std::map<string, string> proto_file_to_framework_name_;
   bool need_to_parse_mapping_file_;
 
-  vector<string> protobuf_framework_imports_;
-  vector<string> protobuf_non_framework_imports_;
-  vector<string> other_framework_imports_;
-  vector<string> other_imports_;
+  std::vector<string> protobuf_framework_imports_;
+  std::vector<string> protobuf_non_framework_imports_;
+  std::vector<string> other_framework_imports_;
+  std::vector<string> other_imports_;
 };
 
 }  // namespace objectivec
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message.cc b/src/google/protobuf/compiler/objectivec/objectivec_message.cc
index 4f22e29..f1465c3 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message.cc
@@ -220,13 +220,13 @@
 
 void MessageGenerator::GenerateStaticVariablesInitialization(
     io::Printer* printer) {
-  for (vector<ExtensionGenerator*>::iterator iter =
+  for (std::vector<ExtensionGenerator*>::iterator iter =
            extension_generators_.begin();
        iter != extension_generators_.end(); ++iter) {
     (*iter)->GenerateStaticVariablesInitialization(printer);
   }
 
-  for (vector<MessageGenerator*>::iterator iter =
+  for (std::vector<MessageGenerator*>::iterator iter =
            nested_message_generators_.begin();
        iter != nested_message_generators_.end(); ++iter) {
     (*iter)->GenerateStaticVariablesInitialization(printer);
@@ -242,7 +242,7 @@
     }
   }
 
-  for (vector<MessageGenerator*>::iterator iter =
+  for (std::vector<MessageGenerator*>::iterator iter =
            nested_message_generators_.begin();
        iter != nested_message_generators_.end(); ++iter) {
     (*iter)->DetermineForwardDeclarations(fwd_decls);
@@ -254,7 +254,7 @@
     return true;
   }
 
-  for (vector<MessageGenerator*>::const_iterator iter =
+  for (std::vector<MessageGenerator*>::const_iterator iter =
            nested_message_generators_.begin();
        iter != nested_message_generators_.end(); ++iter) {
     if ((*iter)->IncludesOneOfDefinition()) {
@@ -266,12 +266,12 @@
 }
 
 void MessageGenerator::GenerateEnumHeader(io::Printer* printer) {
-  for (vector<EnumGenerator*>::iterator iter = enum_generators_.begin();
+  for (std::vector<EnumGenerator*>::iterator iter = enum_generators_.begin();
        iter != enum_generators_.end(); ++iter) {
     (*iter)->GenerateHeader(printer);
   }
 
-  for (vector<MessageGenerator*>::iterator iter =
+  for (std::vector<MessageGenerator*>::iterator iter =
            nested_message_generators_.begin();
        iter != nested_message_generators_.end(); ++iter) {
     (*iter)->GenerateEnumHeader(printer);
@@ -280,13 +280,13 @@
 
 void MessageGenerator::GenerateExtensionRegistrationSource(
     io::Printer* printer) {
-  for (vector<ExtensionGenerator*>::iterator iter =
+  for (std::vector<ExtensionGenerator*>::iterator iter =
            extension_generators_.begin();
        iter != extension_generators_.end(); ++iter) {
     (*iter)->GenerateRegistrationSource(printer);
   }
 
-  for (vector<MessageGenerator*>::iterator iter =
+  for (std::vector<MessageGenerator*>::iterator iter =
            nested_message_generators_.begin();
        iter != nested_message_generators_.end(); ++iter) {
     (*iter)->GenerateExtensionRegistrationSource(printer);
@@ -296,7 +296,7 @@
 void MessageGenerator::GenerateMessageHeader(io::Printer* printer) {
   // This a a map entry message, just recurse and do nothing directly.
   if (IsMapEntryMessage(descriptor_)) {
-    for (vector<MessageGenerator*>::iterator iter =
+    for (std::vector<MessageGenerator*>::iterator iter =
              nested_message_generators_.begin();
          iter != nested_message_generators_.end(); ++iter) {
       (*iter)->GenerateMessageHeader(printer);
@@ -326,7 +326,7 @@
     printer->Print("};\n\n");
   }
 
-  for (vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
+  for (std::vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
        iter != oneof_generators_.end(); ++iter) {
     (*iter)->GenerateCaseEnum(printer);
   }
@@ -345,7 +345,7 @@
       "deprecated_attribute", deprecated_attribute_,
       "comments", message_comments);
 
-  vector<char> seen_oneofs(descriptor_->oneof_decl_count(), 0);
+  std::vector<char> seen_oneofs(descriptor_->oneof_decl_count(), 0);
   for (int i = 0; i < descriptor_->field_count(); i++) {
     const FieldDescriptor* field = descriptor_->field(i);
     if (field->containing_oneof() != NULL) {
@@ -367,7 +367,7 @@
   }
 
   if (!oneof_generators_.empty()) {
-    for (vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
+    for (std::vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
          iter != oneof_generators_.end(); ++iter) {
       (*iter)->GenerateClearFunctionDeclaration(printer);
     }
@@ -377,7 +377,7 @@
   if (descriptor_->extension_count() > 0) {
     printer->Print("@interface $classname$ (DynamicMethods)\n\n",
                    "classname", class_name_);
-    for (vector<ExtensionGenerator*>::iterator iter =
+    for (std::vector<ExtensionGenerator*>::iterator iter =
              extension_generators_.begin();
          iter != extension_generators_.end(); ++iter) {
       (*iter)->GenerateMembersHeader(printer);
@@ -385,7 +385,7 @@
     printer->Print("@end\n\n");
   }
 
-  for (vector<MessageGenerator*>::iterator iter =
+  for (std::vector<MessageGenerator*>::iterator iter =
            nested_message_generators_.begin();
        iter != nested_message_generators_.end(); ++iter) {
     (*iter)->GenerateMessageHeader(printer);
@@ -410,7 +410,7 @@
     printer->Print("@implementation $classname$\n\n",
                    "classname", class_name_);
 
-    for (vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
+    for (std::vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
          iter != oneof_generators_.end(); ++iter) {
       (*iter)->GeneratePropertyImplementation(printer);
     }
@@ -425,7 +425,7 @@
     scoped_array<const FieldDescriptor*> size_order_fields(
         SortFieldsByStorageSize(descriptor_));
 
-    vector<const Descriptor::ExtensionRange*> sorted_extensions;
+    std::vector<const Descriptor::ExtensionRange*> sorted_extensions;
     for (int i = 0; i < descriptor_->extension_range_count(); ++i) {
       sorted_extensions.push_back(descriptor_->extension_range(i));
     }
@@ -448,7 +448,7 @@
       sizeof_has_storage = 1;
     }
     // Tell all the fields the oneof base.
-    for (vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
+    for (std::vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
          iter != oneof_generators_.end(); ++iter) {
       (*iter)->SetOneofIndexBase(sizeof_has_storage);
     }
@@ -548,7 +548,7 @@
     if (oneof_generators_.size() != 0) {
       printer->Print(
           "    static const char *oneofs[] = {\n");
-      for (vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
+      for (std::vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
            iter != oneof_generators_.end(); ++iter) {
         printer->Print(
             "      \"$name$\",\n",
@@ -623,18 +623,18 @@
           .GenerateCFunctionImplementations(printer);
     }
 
-    for (vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
+    for (std::vector<OneofGenerator*>::iterator iter = oneof_generators_.begin();
          iter != oneof_generators_.end(); ++iter) {
       (*iter)->GenerateClearFunctionImplementation(printer);
     }
   }
 
-  for (vector<EnumGenerator*>::iterator iter = enum_generators_.begin();
+  for (std::vector<EnumGenerator*>::iterator iter = enum_generators_.begin();
        iter != enum_generators_.end(); ++iter) {
     (*iter)->GenerateSource(printer);
   }
 
-  for (vector<MessageGenerator*>::iterator iter =
+  for (std::vector<MessageGenerator*>::iterator iter =
            nested_message_generators_.begin();
        iter != nested_message_generators_.end(); ++iter) {
     (*iter)->GenerateSource(printer);
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message.h b/src/google/protobuf/compiler/objectivec/objectivec_message.h
index 8f317ac..2de03f1 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message.h
@@ -86,10 +86,10 @@
   FieldGeneratorMap field_generators_;
   const string class_name_;
   const string deprecated_attribute_;
-  vector<ExtensionGenerator*> extension_generators_;
-  vector<EnumGenerator*> enum_generators_;
-  vector<MessageGenerator*> nested_message_generators_;
-  vector<OneofGenerator*> oneof_generators_;
+  std::vector<ExtensionGenerator*> extension_generators_;
+  std::vector<EnumGenerator*> enum_generators_;
+  std::vector<MessageGenerator*> nested_message_generators_;
+  std::vector<OneofGenerator*> oneof_generators_;
 
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
 };
diff --git a/src/google/protobuf/compiler/php/php_generator.cc b/src/google/protobuf/compiler/php/php_generator.cc
index dd4392c..eefdb19 100644
--- a/src/google/protobuf/compiler/php/php_generator.cc
+++ b/src/google/protobuf/compiler/php/php_generator.cc
@@ -1265,7 +1265,7 @@
     // HTML-escape them so that they don't accidentally close the doc comment.
     comments = EscapePhpdoc(comments);
 
-    vector<string> lines = Split(comments, "\n");
+    std::vector<string> lines = Split(comments, "\n");
     while (!lines.empty() && lines.back().empty()) {
       lines.pop_back();
     }