C++ Logo

std-discussion

Advanced search

Re: Trying to solve how to do a std::unordered_map<std::pair<..., ...>, ...>

From: Aaron Gray <aaronngray.lists_at_[hidden]>
Date: Tue, 3 Oct 2023 20:06:47 +0100
On Tue, 3 Oct 2023 at 01:56, Thiago Macieira via Std-Discussion
<std-discussion_at_[hidden]> wrote:
>
> On Monday, 2 October 2023 11:45:17 PDT Edward Catmur via Std-Discussion wrote:
> > And don't try to specialize hash on unconstrained std::pair; it isn't
> > yours. Write a separate hash class to use explicitly if you must.
>
> Better yet: stop using std::pair.

Hi Thiago,

What would you use instead for my use case which is memorization of a
pair of types or type variables used for comparison and subtyping
predicates for a type system.

Regards,

Aaron

Received on 2023-10-03 19:06:57