Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 425 by scot...@chromium.org: compiler/command_line_interface.cc doesn't compile on vs2012
http://code.google.com/p/protobuf/issues/detail?id=425

Error is:

[1->1/2 ~0] CXX obj\third_party\protobuf\src\google\protobuf\compiler\protoc.command_line_interface.obj FAILED: ninja -t msvc -r . -o obj\third_party\protobuf\src\google\protobuf\compiler\protoc.command_line_interface.obj -e environment.x86 -- cl.exe /nologo /showIncludes /FC @obj\third_party\protobuf\src\google\protobuf\compiler\protoc.command_line_interface.obj.rsp /c ..\..\third_party\protobuf\src\google\protobuf\compiler\command_line_interface.cc /Foobj\third_party\protobuf\src\google\protobuf\compiler\protoc.command_line_interface.obj /Fdprotoc.pdb d:\src\cr\src\third_party\protobuf\src\google\protobuf\compiler\command_line_interface.cc(913) : error C2664: 'std::make_pair' : cannot convert parameter 1 from 'std::string' to 'std::string &&'
        You cannot bind an lvalue to an rvalue reference


Seems odd to have explicit specialization on make_pair. Trivial patch:


diff --git a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc b/third_party/protobuf/src/google/protobuf/index 060a612..c5be9b4 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc @@ -910,7 +910,7 @@ bool CommandLineInterface::InterpretArgument(const string& name, cerr << disk_path << ": warning: directory does not exist." << endl;
       }

- proto_path_.push_back(make_pair<string, string>(virtual_path, disk_path));
+      proto_path_.push_back(make_pair(virtual_path, disk_path));
     }

   } else if (name == "-o" || name == "--descriptor_set_out") {


--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to