I wrote two functions.
PointCloud<PointXYZ>::Ptr rotateCloud(PointCloud<PointXYZ>::Ptr src);
PointCloud<PointXYZRGB>::Ptr rotateCloud(PointCloud<PointXYZRGB>::Ptr src);
In these two functions, I write completely same code without inside <>
. <PointXYZ>
or <PointXYZRGB>
.
I want to write a single function.I heard there is Template.I tried it.
template <typename T>
PointCloud<T>::Ptr rotateCloud(PointCloud<T>::Ptr src);
I got error.
use the 'typename' keyword to treat nontype "pcl::PointCloud<PointT>::Ptr [with PointT=T]" as a type in a dependent contextC/C++(2675)
I can't understand this error message.
Anyone can understand?