Fixed compilation problems with g++ < 3.4.

This commit is contained in:
Vincent Richard 2004-12-08 19:57:10 +00:00
parent 9bbc42c783
commit c032bcb428
2 changed files with 6 additions and 3 deletions

View File

@ -44,6 +44,8 @@ protected:
NameMap m_nameMap; NameMap m_nameMap;
public:
template <class TYPE> template <class TYPE>
class registerer class registerer
{ {
@ -56,7 +58,6 @@ protected:
} }
}; };
public:
template <class T> template <class T>
void registerName(const string& name) void registerName(const string& name)

View File

@ -202,7 +202,8 @@ public:
const property* const prop = find(name); const property* const prop = find(name);
if (!prop) throw exceptions::no_such_property(name); if (!prop) throw exceptions::no_such_property(name);
return (prop->getValue <TYPE>()); //return (prop->getValue <TYPE>()); // BUG: with g++ < 3.4
return (prop->template getValue <TYPE>());
} }
/** Get the value of the specified property. /** Get the value of the specified property.
@ -218,7 +219,8 @@ public:
const TYPE getProperty(const string& name, const TYPE defaultValue) const const TYPE getProperty(const string& name, const TYPE defaultValue) const
{ {
const property* const prop = find(name); const property* const prop = find(name);
return (prop ? prop->getValue <TYPE>() : defaultValue); //return (prop ? prop->getValue <TYPE>() : defaultValue); // BUG: with g++ < 3.4
return (prop ? prop->template getValue <TYPE>() : defaultValue);
} }
/** Change the value of the specified property or create /** Change the value of the specified property or create