Re: GCC 3.3 template compile error?
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