Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_hash.hh')
-rw-r--r--source/blender/blenlib/BLI_hash.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_hash.hh b/source/blender/blenlib/BLI_hash.hh
index fbed321534c..11ff7d040aa 100644
--- a/source/blender/blenlib/BLI_hash.hh
+++ b/source/blender/blenlib/BLI_hash.hh
@@ -250,6 +250,20 @@ template<typename T> struct DefaultHash<std::unique_ptr<T>> {
}
};
+template<typename T> struct DefaultHash<std::shared_ptr<T>> {
+ uint64_t operator()(const std::shared_ptr<T> &value) const
+ {
+ return get_default_hash(value.get());
+ }
+};
+
+template<typename T> struct DefaultHash<std::reference_wrapper<T>> {
+ uint64_t operator()(const std::reference_wrapper<T> &value) const
+ {
+ return get_default_hash(value.get());
+ }
+};
+
template<typename T1, typename T2> struct DefaultHash<std::pair<T1, T2>> {
uint64_t operator()(const std::pair<T1, T2> &value) const
{