Closed GoogleCodeExporter closed 9 years ago
If you change "make_pair(name, value)" to "make_pair<std::string,const
FileDescriptorProto*>(name, value)", does it work? If so, your compiler's
definition
of the "pair" template is apparently missing a constructor.
Original comment by kenton@google.com
on 22 Feb 2010 at 11:20
I worked around the issue by using an alternative STL implementation.
This page has something that might be a different workaround.
http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html
This issue might be a duplicate of issue 134.
Original comment by maciej.b...@gmail.com
on 28 Feb 2010 at 12:18
Changing
by_symbol_.insert(iter, make_pair(name, value));
to
by_symbol_.insert(iter, map<string, Value>::value_type(name, value));
resolves the problem on Sun compiler when using Cstd lib (i.e. without
stlport4).
The problem appears to be that make_pair returns pair<string, Value> but the
insert operation requires pair<const string, Value> (i.e. value_type) and the
pair conversion is not supported in the default stl implementation provided
with this compiler.
Original comment by philip.l...@gmail.com
on 24 Aug 2010 at 10:18
BTW, compiler/command_line_interface.cc contains a similar problem with Sun
Studio compiler with default STL implementation:
Changing
proto_path_.push_back(make_pair("", "."));
to
proto_path_.push_back(make_pair<string, string>("", "."));
resolves problem (or replace make_pair with value_type for collection).
Original comment by philip.l...@gmail.com
on 24 Aug 2010 at 10:31
Great, a solution. Will fix for next release.
Original comment by kenton@google.com
on 24 Aug 2010 at 10:10
Fixed in r353
Original comment by liujisi@google.com
on 3 Dec 2010 at 9:15
make_pair<string, string> is not compatible with C++0x. You probably want
pair<string, string> as a workaround for broken stdlibs.
Original comment by james.de...@gmail.com
on 26 Apr 2011 at 7:34
Original issue reported on code.google.com by
maciej.b...@gmail.com
on 21 Feb 2010 at 8:50