-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 3d_rec_framework compilation error #2495
Fix 3d_rec_framework compilation error #2495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into it so quickly.
@@ -22,8 +22,7 @@ template<template<class > class Distance, typename PointInT, typename FeatureT> | |||
typedef std::pair<std::string, int> mv_pair; | |||
mv_pair pair_model_view = std::make_pair (model.id_, view_id); | |||
|
|||
std::map<mv_pair, Eigen::Matrix4f, std::less<mv_pair>, Eigen::aligned_allocator<std::pair<mv_pair, Eigen::Matrix4f> > >::iterator it = | |||
poses_cache_.find (pair_model_view); | |||
auto it = poses_cache_.find (pair_model_view); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we can only adopt this once we move to C++14. Right now this is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto
is supported since C++11, not C++14.
That's why I used it. Anyway, if you want me to revert this to its previous type declaration I'll do it right away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PCL is currently on C++03, not C++11. We're skipping C++11 entirely and going straight for C++14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PCL is currently on C++03, not C++11. We're skipping C++11 entirely and going straight for C++14.
Ok, now it's also clear to me why the topic about C++14. There's a skip of C++11 that I missed altogether 😄
Roger. Reverting the iterator right now.
@@ -463,8 +463,7 @@ template<template<class > class Distance, typename PointInT, typename FeatureT> | |||
typedef std::pair<std::string, int> mv_pair; | |||
mv_pair pair_model_view = std::make_pair (model.id_, view_id); | |||
|
|||
std::map<mv_pair, Eigen::Matrix4f, std::less<mv_pair>, Eigen::aligned_allocator<std::pair<mv_pair, Eigen::Matrix4f> > >::iterator it = | |||
poses_cache_.find (pair_model_view); | |||
auto it = poses_cache_.find (pair_model_view); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Eigen::aligned_allocator was set unproperly. A const declaration was missing in template type. See http://eigen.tuxfamily.org/dox/group__TopicStlContainers.html.
cb319fb
to
af83b86
Compare
Ok, done 👍 |
Thanks. |
Eigen::aligned_allocator
was set unproperly.A
const
declaration was missing in template type.See here for fruther documentation bout the error.
I also changed explicit iterator type declaration with
auto
, which is much more compact and less error prone (avoids redundant repetition of type names).