Skip to content

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

Description

@stevenwdv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions