blob: 826e5d6e39c1a62f9d6b30f789d29f76a2b46688 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From dd1f33fd93fe713abb8ff49ec635f85a3dc5c1ce Mon Sep 17 00:00:00 2001
From: Laszlo Agocs <laszlo.agocs@qt.io>
Date: Mon, 1 Aug 2022 14:26:04 +0200
Subject: [PATCH] Fix C++20 build
Change-Id: I1264cfccf1165ddc7a9177830376fb37176ece35
---
src/3rdparty/embree/common/sys/vector.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/3rdparty/embree/common/sys/vector.h b/src/3rdparty/embree/common/sys/vector.h
index f8326267..6e0e6cd6 100644
--- a/src/3rdparty/embree/common/sys/vector.h
+++ b/src/3rdparty/embree/common/sys/vector.h
@@ -127,7 +127,7 @@ namespace embree
{
assert(!empty());
size_active--;
- alloc.destroy(&items[size_active]);
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, &items[size_active]);
}
__forceinline void clear()
@@ -179,7 +179,7 @@ namespace embree
if (new_active < size_active)
{
for (size_t i=new_active; i<size_active; i++)
- alloc.destroy(&items[i]);
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, &items[i]);
size_active = new_active;
}
@@ -195,7 +195,7 @@ namespace embree
items = alloc.allocate(new_alloced);
for (size_t i=0; i<size_active; i++) {
::new (&items[i]) T(std::move(old_items[i]));
- alloc.destroy(&old_items[i]);
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, &old_items[i]);
}
for (size_t i=size_active; i<new_active; i++) {
--
2.36.1.windows.1
|