Skip to content
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 warnings: friend operators not declared within the same namespace #265

Open
wants to merge 1 commit into
base: ros2
Choose a base branch
from

Conversation

RoboticsYY
Copy link
Contributor

This PR intends to fix the warnings shown up in the MoveIt 2 CI result.

Those warning messages are:

VRender/Primitive.cpp:165:15: warning: ‘std::ostream& vrender::operator<<(std::ostream&, const vrender::Feedback3DColor&)’ has not been declared within vrender
 std::ostream& vrender::operator<<(std::ostream& o,const Feedback3DColor& f)
               ^~~~~~~
In file included from VRender/Primitive.cpp:47:0:
VRender/Primitive.h:105:24: note: only here as a friend
   friend std::ostream& operator<<(std::ostream&,const Feedback3DColor&) ;
                        ^~~~~~~~
VRender/Vector2.cpp:94:9: warning: ‘vrender::Vector2 vrender::operator-(const vrender::Vector2&)’ has not been declared within vrender
 Vector2 vrender::operator- (const Vector2& u)
         ^~~~~~~
In file included from VRender/Vector2.cpp:45:0:
VRender/Vector2.h:117:19: note: only here as a friend
    friend Vector2 operator- (const Vector2&);
                   ^~~~~~~~
VRender/Vector3.cpp:125:9: warning: ‘vrender::Vector3 vrender::operator*(double, const vrender::Vector3&)’ has not been declared within vrender
 Vector3 vrender::operator* (double r,const Vector3& u)
         ^~~~~~~
In file included from VRender/Vector3.cpp:46:0:
VRender/Vector3.h:158:19: note: only here as a friend
    friend Vector3 operator* (double,const Vector3&);
                   ^~~~~~~~
VRender/Vector3.cpp:155:15: warning: ‘std::ostream& vrender::operator<<(std::ostream&, const vrender::Vector3&)’ has not been declared within vrender
 std::ostream& vrender::operator<< (std::ostream& out,const Vector3& u)
               ^~~~~~~
In file included from VRender/Vector3.cpp:46:0:
VRender/Vector3.h:171:25: note: only here as a friend
    friend std::ostream& operator<< (std::ostream&,const Vector3&);
                         ^~~~~~~~
VRender/NVector3.cpp:85:8: warning: ‘double vrender::operator*(const vrender::NVector3&, const vrender::Vector3&)’ has not been declared within vrender
 double vrender::operator*(const NVector3 &u,const Vector3  &v)
        ^~~~~~~
In file included from VRender/NVector3.cpp:45:0:
VRender/NVector3.h:89:19: note: only here as a friend
     friend double operator*(const NVector3 &u,const Vector3  &v);
                   ^~~~~~~~
VRender/NVector3.cpp:90:8: warning: ‘double vrender::operator*(const vrender::Vector3&, const vrender::NVector3&)’ has not been declared within vrender
 double vrender::operator*(const Vector3  &u,const NVector3 &v)
        ^~~~~~~
In file included from VRender/NVector3.cpp:45:0:
VRender/NVector3.h:90:19: note: only here as a friend
     friend double operator*(const Vector3  &u,const NVector3 &v);
                   ^~~~~~~~

@ahornung
Copy link
Member

This is the source of the included QGLViewer, preferrably it shoud not even be used by a newer, already packaged QGLViewer version.

Is MoveIt 2 at all using octovis (which requires QGLViewer)?

@RoboticsYY
Copy link
Contributor Author

This is the source of the included QGLViewer, preferrably it shoud not even be used by a newer, already packaged QGLViewer version.

Is MoveIt 2 at all using octovis (which requires QGLViewer)?

I think MoveIt 2 doesn't use octovis. These warnings were met last time when compiling MoveIt2 with the source of Octomap, which blocked CI to pass. Currently, MoveIt2 solved this by using the released version of Octomap. Maybe these fixes could also be useful for other packages that build Octomap from source on ROS2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants