I have a class template:
template <class T>
class NormalEstimator
{
public:
NormalEstimator(pcl::PointCloud<T>::Ptr cloud) : _cloud(cloud) {}
void computeNormals();
pcl::PointCloud<pcl::Normal>::Ptr getNormals();
private:
typename pcl::PointCloud<T>::Ptr _cloud;
pcl::PointCloud<pcl::Normal>::Ptr _normals;
int _kNeighbours;
};
The member functions are declared in the header file as well. When compiling, this gives me the error:
.../normal_estimator.h:12: error: expected ')' before 'cloud'
Am I forgetting something? Do I need to specify 'typename' on the constructor as well in some way or form?