C++ Logo

std-discussion

Advanced search

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

From: Aaron Gray <aaronngray.lists_at_[hidden]>
Date: Mon, 2 Oct 2023 10:33:47 +0100
I am trying to work out how to do a :-

    std::unordered_map<std::pair<const Type *, const Type*>, bool,
std::hash<Type>> subTypeMemorization;

Given a barebones class Type :-

    class Type {
    public:
        std::string name;
        ....
    };

Godbolt attempted example :-

     https://godbolt.org/z/r4YrG841E

Many thanks in advance,

Aaron

Received on 2023-10-02 09:34:09