Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12353 closed Bugs (fixed)

std::unary_function is removed in c++17, but still used in hash lib

Reported by: neveralso@… Owned by: Daniel James
Milestone: To Be Determined Component: hash
Version: Boost 1.61.0 Severity: Problem
Keywords: c++17 unary_function Cc:

Description

In file boost/functional/hash/hash.hpp line 438

I compiled in Visual Studio 2015 with /std:c++latest option. Compiler reports that the unary_function is not a member of "std".

Here is the cpp doc about std::unary_function, std::unary_function is deprecated in C++11 and removed in C++17

http://en.cppreference.com/w/cpp/utility/functional/unary_function

Change History (5)

comment:1 by jeanga@…, 6 years ago

This issue is still in Boost 1.63.0. Any ETA for a fix?

Thx! Jean

comment:2 by Daniel James, 6 years ago

Resolution: fixed
Status: newclosed

Sorry, I forgot to close this ticket. It's fixed in master, so it should be in Boost 1.64.0.

comment:3 by anonymous, 6 years ago

I am hitting this on 1.63.0 too. Even a unofficial patch to work around the problem would help a lot.

comment:3 by anonymous, 6 years ago

I am hitting this on 1.63.0 too. Even a unofficial patch to work around the problem would help a lot.

comment:4 by anonymous, 6 years ago

The appropriate commit is here:

https://github.com/boostorg/functional/commit/281e11b2923249869cce3131a415118bb9e2f1e1

But you could probably just delete all references to the problem classes. I think there's also a Visual Studio option you can use.

Note: See TracTickets for help on using tickets.