Skip to content

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

Open

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.

Activity

  1. added 2 commits that reference this issue on Jan 16, 2024
    51299b5
    7dee3b8
  2. added a commit that references this issue on Jan 25, 2024
    2508fab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions