Closed kevin-- closed 2 years ago
@fr00b0 FYI
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...
@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 🙃
@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.
Merged to avoid this unfortunate situation with removal after deprecation in newer standards
When building with C++20,
result_of
does not exist.So we check the value of
__cplusplus
to selectinvoke_result
instead