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:
authorBrecht Van Lommel <brecht@blender.org>2022-04-25 15:57:59 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-04-25 16:38:20 +0300
commit0310638e946eecc12d10aa533f8f6ce6200dd7b3 (patch)
tree9899a4e41c649b090d25658307bd6c19ad328767 /source/blender/blenlib/BLI_any.hh
parentab032fba39e2a6c6c1e1543439f0b0a6624a6ebf (diff)
Fix build error on Linux + Clang 10 after recent changes to BLI_any
Differential Revision: https://developer.blender.org/D14749
Diffstat (limited to 'source/blender/blenlib/BLI_any.hh')
-rw-r--r--source/blender/blenlib/BLI_any.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_any.hh b/source/blender/blenlib/BLI_any.hh
index 875e7cce056..ca3d5756c52 100644
--- a/source/blender/blenlib/BLI_any.hh
+++ b/source/blender/blenlib/BLI_any.hh
@@ -40,7 +40,7 @@ template<typename ExtraInfo, typename T>
static constexpr AnyTypeInfo<ExtraInfo> info_for_inline = {
[](void *dst, const void *src) { new (dst) T(*(const T *)src); },
[](void *dst, void *src) { new (dst) T(std::move(*(T *)src)); },
- [](void *src) { ((T *)src)->~T(); },
+ [](void *src) { std::destroy_at(((T *)src)); },
[](const void *src) { return src; },
ExtraInfo::template get<T>()};
@@ -53,7 +53,7 @@ template<typename ExtraInfo, typename T>
static constexpr AnyTypeInfo<ExtraInfo> info_for_unique_ptr = {
[](void *dst, const void *src) { new (dst) Ptr<T>(new T(**(const Ptr<T> *)src)); },
[](void *dst, void *src) { new (dst) Ptr<T>(new T(std::move(**(Ptr<T> *)src))); },
- [](void *src) { ((Ptr<T> *)src)->~Ptr<T>(); },
+ [](void *src) { std::destroy_at((Ptr<T> *)src); },
[](const void *src) -> const void * { return &**(const Ptr<T> *)src; },
ExtraInfo::template get<T>()};