-
Notifications
You must be signed in to change notification settings - Fork 45
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 compilation on lastest MSVC #7
Conversation
std::unary_function has been removed from C++ 17 standard so it does not compile anymore on MSVC
I haven't worked on Boost for over a decade now (this one piece of code is 17 years old :) @brandon-kohn can you do that? or alternatively: @Beman can I get write-acesss? and where do I learn about current procedures so I don't mess things up. TIA |
Welcome back, @fcacciola. Enjoy your write access. :-) |
Thank you Peter! |
Hello, Is there any information when this will land in master (for a future release?) |
I now have another short slot of free time so I'm looking into this.
The fix itself has been already proposed and verified, but I don't seem to
have "merge permissions" or whatever.. or I don't understand the process,
so I'm still figuring out how to "land this into master" for the upcoming
release.
…On Fri, Dec 1, 2017 at 1:43 PM, Jeroen Janssen ***@***.***> wrote:
Hello,
Is there any information when this will land in master (for a future
release?)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjlcH2iS6Ff71Qld3NiEMKMdtVfCRS7ks5s8CydgaJpZM4PlkQO>
.
--
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com
|
Maybe I don't have to do anything myself manually? The fix is already in "boostorg:develop". |
@fcacciola Thanks! You already merged this into develop some months ago. Now it needs to be merged from develop to master so that it appears in a release. |
A deadline for changes to master has passed though so it might be best to ask @danieljames to take a look first. |
The deadline was major changes, this isn't a major change, so it's still possible. But I'm not sure about this pull request - it really shouldn't be relying on anything from |
Hi Daniel,
From the history, initially, Brandon Khon just completely removed the use
of unary_traits (removed in C++17), but apparently, THAT broke MSVC, which
is why in the latest and currently merged changeset, that was sort of
"reintroduced" via boost::functional::detail.
It's been ages since I've look at anything here so I'm not sure anymore.
It seems however that you might be right, and the reintroduction of the
traits from functional::detail might have not been the right move, and just
removing these altogether was the right fix.
The MSVC issue says:
"std::unary_function has been removed from C++ 17 standard so it does not
compile anymore on MSVC
Setup :
Lastest MSVC
C++ 2017
Which seems to imply Brandon's fix was already correct. However, the latest
change was on top of Brandon's fix, so I take it to mean it didn't really
work on VC 2017?
I don't really have anything setup for testing boost at all. I can do that,
but if it takes too long, I will be push aside with work as usual and might
only be able to get back after the deadline, so, if any of you can re-test
the previous changeset (the one you pointed) with VC 2017 to see if that
fix really didn't work, we might get this done a lot faster.
PS: What do you use to read and post to the boost development list? I can
only read it from google groups and "post" by manually emailing to it. Back
in the days, I used some usenet service, but I changed houses, computers
and notes so many times since then that now I can't find anything related
to it.
…On Wed, Feb 28, 2018 at 11:57 AM, Daniel James ***@***.***> wrote:
The deadline was major changes, this isn't a major change, so it's still
possible. But I'm not sure about this pull request - it really shouldn't be
relying on anything from functional::detail. It looks like the use of
std::unary_traits was removed in ebfded1
<ebfded1>
so this might not be needed anyway.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjlcL1LNApquAVwY2KLLcOwfRWpKCr1ks5tZWljgaJpZM4PlkQO>
.
--
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com
|
OK, then it's not clear why this was failing, it'd be helpful to see an error message or how to replicate the error. The original report said it was due to the removal of |
The issue depends on whether C++17 mode is enabled for MSVC; The default for MSVC is /std:c++14, in which case unary_function is available and everything compiles. However, with /std:c++17 or /std:c++latest, MSVC no longer provides unary/binary function. Perhaps the confusion of whether things are removed or not is due to different uses of the /std switch. Right now, users have to choose between using some boost libraries like lexical_cast and special math, or C++17 features. A fix for /std:c++17 mode would be greatly appreciated. |
What makes this even more interesting is that I can see in the diff that the typedefs are already present at least in |
A fix for what specific issue with |
Then we need an example that demonstrates why it didn't really work. |
I must be clear - I am reporting the issue as it appears in 1.65.1; If it is already fixed when 1.66 is out, that would be great. With 1.65.1, simply using ibeta from <boost/math/special_functions/beta.hpp> or just including <boost/lexical_cast.hpp> is enough to break with /std:c++17 (using the latest toolchain supported by boost as of 1.65.1, which is MSVC 14.11). The initial report was not clear whether the /std switch was used, and if so, at what setting. It was also not clear exactly what MSVC version was used - 14.10, 14.11, or 14.12. |
1.66.0 was released in December. |
Sorry - my bad - I was writing from memory, we are using 1.66 and waiting for the April release that will support MSVC 14.12 |
The tests for 1.66 pass with
|
OK - scratch all of that, I must have coffee. The build I am looking at is using 1.65.1; It did not switch to 1.66 because 1.66 did not add MSVC 14.12 support so it did appear to be an useless upgrade; now that we are turning on /std:c++17, it seems that it does bring in other benefits. I apologize for the confusion - and appreciate the quick response. |
On Mon, Mar 5, 2018 at 12:45 PM, Peter Dimov ***@***.***> wrote:
The tests for 1.66 pass with /std:c++17 for me. lexical_cast too.
commit ebfded1 (HEAD -> master, tag: boost-1.66.0, origin/master)
Author: Brandon Kohn ***@***.***>
Date: Tue Aug 22 13:39:34 2017 -0400
Remove the deprecated uses of std::unary_function (again).
So, what I have to do is just to revert back to Brandon's fix. Do we agree?
…--
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com
|
That's good for me. Thanks. |
Already reverted in "develop"
If I open a new PR, base: master <- compare: develop
the "Create Pull Request" button is disabled. Seems like I need permissions
to do that.
ANYWAY
If I look into master directly, Brandon had already merged his own changes
into it (and his changes are the ones that work as far as we can tell)
The documentation changes (and your own fix there) might be merged to
master too.
…On Mon, Mar 5, 2018 at 3:51 PM, Daniel James ***@***.***> wrote:
That's good for me. Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjlcCzhA556ebZOYL-zOAdgxhGbODuSks5tbYlIgaJpZM4PlkQO>
.
--
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com
|
The 'Create Pull Request' button isn't enabled until you enter a title. Although I'd just use command line git to do the merge. As far as I can tell, the changes in develop are:
None of these are really needed for a release, but you can merge them if you want. |
OK.
After more carefully reviewing all the changes, I created the Pull Request.
I see that I *can* merge the PR myself, but I don't know if I should or is
that on the hands of the release manager (you)?
…On Tue, Mar 6, 2018 at 4:04 PM, Daniel James ***@***.***> wrote:
The 'Create Pull Request' button isn't enabled until you enter a title.
Although I'd just use command line git to do the merge.
As far as I can tell, the changes in develop are:
- Add a README.md for github.
- Remove workarounds for Visual C++ 6 and 7.
- Add a meta/libraries.json file.
None of these are really needed for a release, but you can merge them if
you want.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjlcBP9_lZVjV5CLaOtMYsteMOOM9GIks5tbt1cgaJpZM4PlkQO>
.
--
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com
|
You can. but I'll be stopping automatic updates of the super project's master branch later, so if you haven't accepted it, I'll do it so that it's included in the beta. |
OK. In that case, I'll do it so you have one less thing to work on.
Best and thank you for your help.
…On Wed, Mar 7, 2018 at 4:56 PM, Daniel James ***@***.***> wrote:
You can. but I'll be stopping automatic updates of the super project's
master branch later, so if you haven't accepted it, I'll do it so that it's
included in the beta.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjlcCwa-WHB6te94xT45t_RPT_WETeNks5tcDtqgaJpZM4PlkQO>
.
--
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com
|
std::unary_function has been removed from C++ 17 standard so it does not compile anymore on MSVC
Setup :
Lastest MSVC
C++ 2017
Thanks to Mylerius for the help.