This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/blenlib
Jacques Lucke b90fec5d46 BLI: simplify supporting heterogeneous lookup for new types
Heterogeneous lookup is useful when constructing a key in a
map/set is relatively expensive (e.g. `std::string`). When doing
lookups in the map/set, one usually does not want to construct
the type to avoid overhead. Instead, heterogeneous lookup
allows for using a different type (such as `StringRef`) as key.

This change makes it easier to implement heterogeneous
lookup for custom types. Before, one had to specialize
`blender::DefaultHash`. Now, one just has to implement
a `static uint64_t hash_as(value)` on the type itself.
One still has to provide the equality operator in addition
to the hash function of course.
2021-05-13 14:14:14 +02:00
..
2021-05-06 08:09:05 +10:00
2020-08-27 15:33:33 +10:00
2021-03-29 19:11:17 -06:00
2021-01-11 14:59:05 +01:00
2021-01-11 14:59:05 +01:00
2021-03-18 09:36:44 +11:00
2021-01-04 17:38:11 +11:00
2021-03-18 09:36:44 +11:00
2020-08-28 10:04:26 -06:00
2021-01-04 17:38:11 +11:00
2021-01-15 12:17:11 +11:00
2021-01-11 14:59:05 +01:00
2020-10-19 08:43:08 -07:00
2021-03-25 16:01:41 +01:00
2021-04-19 23:56:12 +10:00
2021-01-04 17:38:11 +11:00