gpt4 book ai didi

c++ - 为什么 unordered_set 不允许 vector 作为键?

转载 作者:行者123 更新时间:2023-11-28 04:32:24 25 4
gpt4 key购买 nike

<分区>

例如:

vector<int> v = {1, 2, 3};
unordered_set<vector<int>> s;
s.insert(v);

会报错

no match for call to '(const std::hash >) (const std::vector&)' noexcept(declval()(declval()))>

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com