Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kevin--
Copy link
Contributor

@kevin-- kevin-- commented Dec 9, 2021

When building with C++20, result_of does not exist.

So we check the value of __cplusplus to select invoke_result instead

@kevin--
Copy link
Contributor Author

kevin-- commented Jan 18, 2022

@fr00b0 FYI

@fr00b0
Copy link
Owner

fr00b0 commented Feb 13, 2022

Hello @kevin--
I'm not sure how what I think about this change. The library was always meant to be a C++ 11 14 library. I have not examined all of the things used to see if deprecation or behavior changes is present with C++ 20.

Edit: C++ 11 ofc, not 14...

@kevin--
Copy link
Contributor Author

kevin-- commented Mar 2, 2022

@fr00b0 as we can see from https://en.cppreference.com/w/cpp/types/result_of the availability notes are

(since C++11)
(deprecated in C++17)
(removed in C++20)

The Notes section explains why result_of had some issues that lead to its eventual removal by the standards committee, and it seems that invoke_result provides identical results with less undefined behavior cases.

my proposed change leaves C++11 compatibility intact but allows me to keep using my favorite signaling library while building against the C++20 standard πŸ™ƒ

@drewr95
Copy link

drewr95 commented Apr 29, 2022

@fr00b0 Can we get this accepted? I'd like to see @kevin--'s changes brought in since it leaves C++11 compatibility intact. I would like to keep using this library as well.

@fr00b0 fr00b0 merged commit 23e4190 into fr00b0:master May 2, 2022
@fr00b0
Copy link
Owner

fr00b0 commented May 2, 2022

Merged to avoid this unfortunate situation with removal after deprecation in newer standards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants