Status: New
Labels: Type-Defect Priority-Medium

New issue 425 by compiler/ doesn't compile on vs2012

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\ /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\ : 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/ b/third_party/protobuf/src/google/protobuf/index 060a612..c5be9b4 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ +++ b/third_party/protobuf/src/google/protobuf/compiler/ @@ -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
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to