Re: Re[2]: GCC 3.3 template compile error?
Re: Re[2]: GCC 3.3 template compile error?
- Subject: Re: Re[2]: GCC 3.3 template compile error?
- From: eric b <email@hidden>
- Date: Sun, 14 Oct 2007 08:47:33 +0200
Hi,
Le 14 oct. 07 à 02:05, Peter Mulholland a écrit :
Hello Tim,
Sunday, October 14, 2007, 12:56:27 AM, you wrote:
class LibXmlReader
{
public:
template <class T> T getAttribute(const xmlpp::Node* node, const
std::string& attrName) const;
...
};
Try:
template <class T> typename T getAttribute(const xmlpp::Node* node,
const
std::string& attrName) const;
Also, this code compiles fine with GCC 4 on my Mac, and with VC++
7.1 on my
Windows PC. It causes GCC 3.3, compiling for PPC, to complain.
IMHO GCC has always been dodgy at handling C++ templates. The GCC docs
claim they are following "the standard", but personally I think it is
just awkward, and an excuse for poor parsing.
Unless you really need to support 10.2 and earlier,
You meant 10.3 I guess ?
Panther uses gcc-3.3 too. If I'm not wrong, gcc-4.x has never been
backported to Panther afaik.
That a big problem for some third part project not directly using
XCode, because it avoids us to maintain easely - just the example I
know - OpenOffice.org.
If you add gcc-3.3 parser issues to templates issue, and some other
issues with other tools shipped in XCode for Panther, the result is a
nightmare for the maintainers.
No need to talk about Jaguar ...
I would just compile your PPC code with GCC 4, which is 10.3.9
minimum.
IMHO, the problem is, Apple never backported the changes for Panther.
GCC 3 has
many known issues, none of which will be fixed now.
Yes, unfortunaly
--
ericb _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden