-
Notifications
You must be signed in to change notification settings - Fork 194
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
Collision between YARP and Casadi #2067
Comments
I suspect this is a bug in both Casadi and YARP, as extending the std namespace without using program-defined type is undefined behavior in C++ (see https://en.cppreference.com/w/cpp/language/extending_std). I think the correct way of doing this is to define the operator<<(std::ostream& os, const std::vector& t) in a non-std namespace, and use it in all the compilation unit in which you want to use it via a using directive. |
To be honest, I don't remember why this was here, it shouldn't be here at all... I suspect this is something I've been using for debugging when there was no LogStream, and the robotinterface was still in iCub. Also this bug should also be reported in casadi... |
Yes, we wanted this issue on YARP to get some nice comments so we could link it from the casadi issue. :D |
As mentioned in #2067 (comment), the long term solution is just to remove that function from both YARP and Casadi . On the YARP side, I think that if someone could propose a PR to get rid of that function in master it would be great, so we would have solved this issue for the next YARP feature release @Giulero @GiulioRomualdi . |
Unfortunately removing those lines causes this compilation error
|
Probably the function can be reintroduced just in that compilation unit for the ParamList type? |
another way is to change the namespace. By the way, removing the function breaks the |
I don't think that YARP follows semantic versioning if I am not wrong. |
Actually we are trying to follow semantic versioning, with some exceptions for dev |
Ah ok, good to know. I wrote that because I remember that back when YARP 3.4 there were breaking changes w.r.t. 3.3, but YARP was not released as YARP 4. Just to clarify, does this means that if deprecated methods are removed in |
Yes, but you are right, we broke something in latest release... I think we are not completely strict on the rule yet 😉 |
This was causing a conflict with Casadi Fixes robotology#2067 Replaces robotology#2421
This was causing a conflict with Casadi Fixes robotology#2067 Replaces robotology#2421
Describe the bug
When including both YARP and Casadi there is a redefinition of the operator
std::ostream& std::operator<<(std::ostream& os, const std::vector<T>& t)
here is the error that I get on compilation:
To Reproduce
Compile the code:
Expected behavior
Correct compilation with both YARP and Casadi libraries available
Screenshots
NA
Configuration (please complete the following information):
Additional context
NA
The text was updated successfully, but these errors were encountered: