View Single Post
  #2 (permalink)  
Old 02-24-2003
marlowa marlowa is offline
Registered User
 
 
Join Date: Feb 2003
Location: London
Posts: 64
Re: weird template compilation error on solaris

Quote:
Originally posted by marlowa
I am trying to compile Slice on Solaris using Forte 6.2. It fails to compile Grammar.cpp due to some weird template problem. I wonder if anyone else could shed some light on this please. Here is the error msg:

"Grammar.y", line 1394: Error: Cannot assign std::pair<IceUtil::Handle<Slice::Builtin>, std::string>
to std::pair<IceUtil::Handle<Slice::SyntaxTreeBase>, std::string> without "std::pair<IceUtil::Handle<Slice::SyntaxTreeBa se>, std::string>::operator=(const std::pair<IceUtil::Handle<Slice::SyntaxTreeB
ase>, std::string>&)";.
"Grammar.y", line 1404: Error: Cannot assign std::pair<IceUtil::Handle<Slice::Builtin>, std::string>
to std::pair<IceUtil::Handle<Slice::SyntaxTreeBase>, std::string> without "std::pair<IceUtil::Handle<Slice::SyntaxTreeBa se>, std::string>::operator=(const std::pair<IceUtil::Handle<Slice::SyntaxTreeB
ase>, std::string>&)";.
Andrew M.
I have more information on the problem. I get such a compilation error for every attempt to assign a make_pair to basestring->v. I believe that this is because v is not of the type pair<A,B>, which raises the question "why does GCC compile it?". I am not sure what this code is doing but if there is some sort of implicit conversion going on with GCC then why is make_pair even being called?

regards,

Andrew M.
__________________
You are in a maze of twisty little passages, all different.
Reply With Quote