C++ Logo

std-discussion

Advanced search

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

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 02 Oct 2023 17:56:23 -0700
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.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-10-03 00:56:32