(原文链接:https://abseil.io/tips/136 译者:clangpp@gmail.com)
每周贴士 #136: 无序容器
- 最初发布于:2017-06-23
- 作者:Matt Kulukundis
- 更新于:2020-04-06
- 短链接:abseil.io/tips/136
“Sometimes, when the material is really good, you put expectations on yourself to make it the best possible show. You’re not just serving up the regular hash and doing your job and going home.” — Peter Dinklage
长话短说:查看https://abseil.io/docs/cpp/guides/container以获取官方和最新的建议。本贴士 介绍 了这些新类型,但并不是权威参考。
介绍absl::*_hash_map
现在有一族新的关联容器到货了。它们自诩有效率提升,还尝鲜了C++17的API。它们还允许开发者直接控制实现细节和默认哈希函数,这些对代码库的长期演进很重要。新的代码应该尽量用这些