Re: [protobuf] MyType_Parse() calls ParseNamedEnum() with 'const std::string' parameter instead of 'const string'

2010-09-22 Thread Evan Jones
On Sep 21, 2010, at 20:19 , Kenton Varda wrote: That still seems strange. The generated code explicitly refers to ::std::string, so it couldn't be using your type. Is your custom "string" type defined with macros? That would probably do the trick, since they don't respect namespaces. Evan

Re: [protobuf] MyType_Parse() calls ParseNamedEnum() with 'const std::string' parameter instead of 'const string'

2010-09-21 Thread Kenton Varda
That still seems strange. The generated code explicitly refers to ::std::string, so it couldn't be using your type. So, it must be that your compiler is misinterpreting the reference to "string" in generated_message_util.h. It seems to be picking up your "string" from the global scope before it

Re: [protobuf] MyType_Parse() calls ParseNamedEnum() with 'const std::string' parameter instead of 'const string'

2010-09-21 Thread Anand Ganesh
Thanks Kenton. I was meaning to update the discussion group this morning about what I found but I got caught up with something. Yes, we have another symbol called "string" in our code (our own implementation of something wrapping a char *; not a class) and if we include the header file containing

Re: [protobuf] MyType_Parse() calls ParseNamedEnum() with 'const std::string' parameter instead of 'const string'

2010-09-21 Thread Kenton Varda
Both "string"s should be referring to the same type. google::protobuf has "using namespace std;" (terrible, I know, it's a long story), so when google::protobuf::internal::ParseNamedEnum declares its parameter to be "const string&", that "string" should resolve to "std::string". So I'm not sure h