-
Notifications
You must be signed in to change notification settings - Fork 769
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
Compilation error with boost::placeholders #812
Comments
I think the offending commit is: 5a2ff19 |
#796 is the related PR. I think a workaround like https://forum.freecadweb.org/viewtopic.php?t=47636 is enough to fix this. |
Huh looks like |
@acxz tagging for visibility. |
@ToniRV FYI the minimum version of Boost we support is now 1.67 due to issues with serialization in prior versions (there is some issue in this repo detailing this). Ubuntu 16.04 comes with 1.58, so it is not officially supported. |
Ok, thanks. I agree for serialization it is needed (we do use it as well in Kimera), but for binding and placeholding? I don't think it is necessary, no? |
I don't think there is any except maintaining API stability. |
@ToniRV I agree with you. I actually tried doing a global replace of bind and placeholders from boost to std, but I ran into some compilation errors which didn't make sense to me. My guess is that the functional returned by boost and that returned by std have some differences so this would be more effort than I have the cycles for. |
Is this PR what's breaking the xenial build on the ubuntu packaging server (note to @jlblancoc)?
|
Yeah. Xenial has an older version of boost which has this issue as well as some serialization bugs. Would it be recommended to revert the PR or somehow get Boost 1.67 as the correct dependency? |
I'm reopening this since I found the main differences for bind between boost and std, and will be making a PR this weekend. https://stackoverflow.com/questions/10555566/difference-between-c11-stdbind-and-boostbind |
@ToniRV @berndpfrommer can we check if the latest develop works for your respective use cases? Please do let me know so I can make the required fixes. 🙂 |
It works, thank you! |
Nightly build succeeded. |
Yayy! The only unfortunate thing is that std::optional is C++17, else we would have come very close to potentially eliminating boost as a dependency. |
That would have been great indeed!
And then the code is the same:
But boost::optional makes things explicit... despite the extra verbosity. |
I think a good alternative is a simple header that implements |
😄 so in my experience, the discussion btw
If we were using c++17 I'd go with std::optional probably. |
Btw @ProfFan, raw pointers are totally fine when they are not mindlessly heap-allocated with |
I managed to find (via StackOverflow) a repo for C++11 compatible |
I second |
All, Why are we getting all excited here ? There are more dependencies on boost, so unless this is the last boost dependency I am not keen on changing this or bringing in tl... |
Not sure what happened, but the builds on Ubuntu 16.04 (xenial) are failing with this error message:
Have we officially dropped support for Ubuntu 16.04? Not a problem, I can take it off the build list, just need to know. |
I think we just require a newer boost because of the I think it’s fair to drop it from builds since 16.04 is EOL. |
I agree with that, but I remember we had this discussion earlier - @varunagrawal? |
Description
Using
boost::placeholders
in 16.04 is not supported (out of the box).Is there a reason why you use
boost::
and notstd::
?Steps to reproduce
Environment
Ubuntu 16.04
The text was updated successfully, but these errors were encountered: