What is the syntax for doing something like this? When I try to compile the code below it tells me that a ';' was expected before '*'
, pointing to the return type of the function, ResourceManager<T>::ResourceWrapper*
.
template<class T>
class ResourceManager
{
private:
struct ResourceWrapper;
ResourceWrapper* pushNewResource(const std::string& file);
};
// (Definition of ResourceWrapper not shown.)
template <class T>
ResourceManager<T>::ResourceWrapper* ResourceManager<T>::pushNewResource(
const std::string& file)
{
// (Irrelevant details)
}