Skip to content
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

is_hashable is broken in C++20 (std::hash<T>::result_type and ::argument_type were removed) #602

Open
stevenwdv opened this issue Dec 19, 2023 · 0 comments · May be fixed by #608
Open

is_hashable is broken in C++20 (std::hash<T>::result_type and ::argument_type were removed) #602

stevenwdv opened this issue Dec 19, 2023 · 0 comments · May be fixed by #608

Comments

@stevenwdv
Copy link

In C++ 20, e.g. rxu::is_hashable<std::string> unexpectedly returns false because std::hash<T>::result_type and ::argument_type were removed (cppreference, P0619R2). See definition of is_hashable:

template<typename T>
struct is_hashable<T,
typename rxu::types_checked_from<
typename filtered_hash<T>::result_type,
typename filtered_hash<T>::argument_type,
typename rxu::callable_result<filtered_hash<T>, T>::type>::type>
: std::true_type {};

This means functions like observable<T>::distinct() do not work anymore.

stevenwdv pushed a commit to stevenwdv/RxCpp that referenced this issue Jan 16, 2024
stevenwdv pushed a commit to stevenwdv/RxCpp that referenced this issue Jan 16, 2024
stevenwdv pushed a commit to stevenwdv/RxCpp that referenced this issue Jan 25, 2024
@stevenwdv stevenwdv linked a pull request Nov 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant