• 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: GCC 3.3 template compile error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC 3.3 template compile error?


  • Subject: Re: GCC 3.3 template compile error?
  • From: David Rowland <email@hidden>
  • Date: Fri, 12 Oct 2007 22:02:09 -0700

Tim Conkling wrote:
I'm compiling a Universal Binary. GCC 4 has no complaints (and neither does Visual C++), but GCC 3.3 chokes on the following code with the disappointingly non-descriptive message, "error: parse error before `;' token".

(The getAttribute() function in the offending line is a templated member function of the LibXmlReader class. It's called from lots of non-template functions with no problems.)

What am I doing wrong here?

template <class T>
class LevelValueScaleTable
{
private:
    T                m_initialValue;
    std::vector<T>    m_scaleTable;

    mutable T        m_cachedValue;
    mutable int        m_cachedScale;

public:
    LevelValueScaleTable() : m_initialValue(0), m_cachedScale(-1) {}

void Read(const LibXmlReader& reader, const xmlpp::Node* node)
{
m_scaleTable.clear();
m_initialValue = reader.getAttribute<T>(node, "initial"); // <-- error occurs here
...
------------------------------------------------------------------------

I have sometimes gotten this error when a name was not recognized, but I don't see that kind of problem here.


Are the arguments to getAttribute correct for type and constness? Do the parameters they correspond to depend on the template parameter for getAttribute?


David

_______________________________________________
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: GCC 3.3 template compile error?
      • From: David Fang <email@hidden>
References: 
 >GCC 3.3 template compile error? (From: "Tim Conkling" <email@hidden>)

  • Prev by Date: GCC 3.3 template compile error?
  • Next by Date: Have dylib, want to preserve drag-install
  • Previous by thread: GCC 3.3 template compile error?
  • Next by thread: Re: GCC 3.3 template compile error?
  • Index(es):
    • Date
    • Thread