• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re[2]: GCC 3.3 template compile error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: GCC 3.3 template compile error?


  • Subject: Re[2]: GCC 3.3 template compile error?
  • From: Peter Mulholland <email@hidden>
  • Date: Sun, 14 Oct 2007 01:05:23 +0100

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, I would just
compile your PPC code with GCC 4, which is 10.3.9 minimum. GCC 3 has
many known issues, none of which will be fixed now.

--
Best regards,
 Peter                            mailto:email@hidden

 _______________________________________________
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

  • Follow-Ups:
    • Re: Re[2]: GCC 3.3 template compile error?
      • From: eric b <email@hidden>
    • Re: Re[2]: GCC 3.3 template compile error?
      • From: Steve Checkoway <email@hidden>
References: 
 >GCC 3.3 template compile error? (From: "Tim Conkling" <email@hidden>)
 >Re: GCC 3.3 template compile error? (From: "Clark Cox" <email@hidden>)
 >Re: GCC 3.3 template compile error? (From: "Tim Conkling" <email@hidden>)

  • Prev by Date: Re: GCC 3.3 template compile error?
  • Next by Date: Re: Re[2]: GCC 3.3 template compile error?
  • Previous by thread: Re: GCC 3.3 template compile error?
  • Next by thread: Re: Re[2]: GCC 3.3 template compile error?
  • Index(es):
    • Date
    • Thread