ReactiveX / RxCpp

Reactive Extensions for C++
Apache License 2.0
3.03k stars 390 forks source link

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

Open stevenwdv opened 8 months ago

stevenwdv commented 8 months ago

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: https://github.com/ReactiveX/RxCpp/blob/761b932a80e2be6e2b62d232e754bd96fc448946/Rx/v2/src/rxcpp/rx-util.hpp#L1022-L1028

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