Skip to content

Unsupported types should be poisoned similarly to the stdlib #33

Description

@cmazakas

Consider https://godbolt.org/z/5W1x94aTh

We see that:

static_assert(std::is_invocable_v<std::hash<rawr>, rawr>);

correctly fails until

template<>
struct std::hash<rawr> {
  std::size_t operator()(rawr const&) const noexcept { return 0; }
};

is defined.

This would enable downstream consumers to write simple is_hashable trait checks.

Activity

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