You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since PCL seems to be moving toward C++14 it could be a good opportunity to add the methods emplace and emplace_back to pcl::PointCloud to take advantage of the C++11 additions to std::vector.
Your Environment
PCL Version: 1.9.1
Context
I had to interface PCL with another type of 3D points, and writing the following to convert between both would have been nice to ensure that everything in written in-place:
pcl::PointCloud<pcl::PointXYZ> out;
out.reserve(legacy_point_collection.size());
for (auto&& point : legacy_point_collection) {
out.emplace_back(point.getX(), point.getY(), point.getZ());
}
Currently the solution is to use push_back, which is fine, but exposing the emplace family of functions would allow for terser code with an in-place construction guarantee even in debug mode.
The text was updated successfully, but these errors were encountered:
Since PCL seems to be moving toward C++14 it could be a good opportunity to add the methods
emplace
andemplace_back
topcl::PointCloud
to take advantage of the C++11 additions tostd::vector
.Your Environment
Context
I had to interface PCL with another type of 3D points, and writing the following to convert between both would have been nice to ensure that everything in written in-place:
Currently the solution is to use
push_back
, which is fine, but exposing theemplace
family of functions would allow for terser code with an in-place construction guarantee even in debug mode.The text was updated successfully, but these errors were encountered: