Dobiasd / FunctionalPlus

Functional Programming Library for C++. Write concise and readable C++ code.
http://www.editgym.com/fplus-api-search/
Boost Software License 1.0
2.1k stars 167 forks source link

FunctionalPlus does not compile with C++20 (std::result_of was removed) #275

Closed dasmysh closed 1 year ago

dasmysh commented 1 year ago

According to cppreference.com std::result_of was deprecated in C++17 and removed in C++20. To make it compile again every occurrence of std::result_of needs to be replaced by std::invoke_result.

An easy fix for C++17 forward would be:

std::result_of<Func(Params)>

becomes

std::invoke_result<Func, Params>

but a solution that also works for C++14 is probably preferred.

Dobiasd commented 1 year ago

The problem of std::result_of being deprecated already came up in this issue and was fixed by that commit.

So there should be no std::result_of in the whole FunctionalPlus code anymore.

Which version of FunctionalPlus are you using?

dasmysh commented 1 year ago

Sorry, I should have searched for the issue before reporting. I used the one mentioned in the frugally-deep installation instructions.

Dobiasd commented 1 year ago

Oh, thanks a lot for the remark! :+1:

I just released a new version of FunctionalPlus and updated the frugally-deep docs accordingly. :heavy_check_mark: