aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/PhysX/0001-Support-GCC-12-C-20-mode.patch
blob: 3a791716ee765be85d1cd06414cdf9e252b3f643 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
From 89f66ec05b3114a642e62223f0d71e8277a751b6 Mon Sep 17 00:00:00 2001
From: Jonas Karlsson <jonas.karlsson@qt.io>
Date: Thu, 24 Nov 2022 13:38:19 +0100
Subject: [PATCH] Support GCC 12 C++20 mode

This fix just removes a few templates which is needed since C++20 breaks
previously valid code. See
https://timsong-cpp.github.io/cppwp/n4861/diff.cpp17.class

This is basically what is allowed and not in c++20:

template<class T>
struct A {
  A<T>();  // error: simple-template-id not allowed for constructor
  A(int);  // OK, injected-class-name used
  ~A<T>(); // error: simple-template-id not allowed for destructor
};

Change-Id: I4284b9a96f06f086f1369a40f374e9a885036fe5
---
 .../PhysX/source/common/src/CmPreallocatingPool.h         | 2 +-
 .../physxmetadata/core/include/PvdMetaDataExtensions.h    | 2 +-
 .../source/physxmetadata/core/include/PxMetaDataObjects.h | 2 +-
 .../extensions/include/PxExtensionMetaDataObjects.h       | 2 +-
 .../src/physxmetadata/include/PxVehicleMetaDataObjects.h  | 2 +-
 .../PhysX/source/pvd/include/PxPvdObjectModelBaseTypes.h  | 8 ++++----
 src/3rdparty/PhysX/source/pvd/src/PxProfileZoneImpl.h     | 2 +-
 .../PhysX/source/pvd/src/PxPvdObjectModelInternalTypes.h  | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/3rdparty/PhysX/source/common/src/CmPreallocatingPool.h b/src/3rdparty/PhysX/source/common/src/CmPreallocatingPool.h
index 48bcad0..a17ae17 100644
--- a/src/3rdparty/PhysX/source/common/src/CmPreallocatingPool.h
+++ b/src/3rdparty/PhysX/source/common/src/CmPreallocatingPool.h
@@ -396,7 +396,7 @@ template<class T>
 class BufferedPreallocatingPool : public PreallocatingPool<T>
 {
 	Ps::Array<T*> mDeletedElems;
-	PX_NOCOPY(BufferedPreallocatingPool<T>)
+	PX_NOCOPY(BufferedPreallocatingPool)
 public:
 	BufferedPreallocatingPool(PxU32 maxElements, const char* typeName) : PreallocatingPool<T>(maxElements, typeName)
 	{
diff --git a/src/3rdparty/PhysX/source/physxmetadata/core/include/PvdMetaDataExtensions.h b/src/3rdparty/PhysX/source/physxmetadata/core/include/PvdMetaDataExtensions.h
index 957440e..142ded0 100644
--- a/src/3rdparty/PhysX/source/physxmetadata/core/include/PvdMetaDataExtensions.h
+++ b/src/3rdparty/PhysX/source/physxmetadata/core/include/PvdMetaDataExtensions.h
@@ -300,7 +300,7 @@ template<typename TEnumType, typename TStorageType>
 struct IsFlagsType<PxFlags<TEnumType, TStorageType> > 
 {
 	const PxU32ToName* FlagData;
-	IsFlagsType<PxFlags<TEnumType, TStorageType> > () : FlagData( PxEnumTraits<TEnumType>().NameConversion ) {}
+	IsFlagsType() : FlagData( PxEnumTraits<TEnumType>().NameConversion ) {}
 };
 
 
diff --git a/src/3rdparty/PhysX/source/physxmetadata/core/include/PxMetaDataObjects.h b/src/3rdparty/PhysX/source/physxmetadata/core/include/PxMetaDataObjects.h
index d120956..2b20da6 100644
--- a/src/3rdparty/PhysX/source/physxmetadata/core/include/PxMetaDataObjects.h
+++ b/src/3rdparty/PhysX/source/physxmetadata/core/include/PxMetaDataObjects.h
@@ -490,7 +490,7 @@ struct PxPropertyToValueStructMemberMap
 	template<> struct PxPropertyToValueStructMemberMap< PxPropertyInfoName::type##_##prop >												\
 	{																																	\
 		PxU32 Offset;																													\
-		PxPropertyToValueStructMemberMap< PxPropertyInfoName::type##_##prop >() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {}		\
+		PxPropertyToValueStructMemberMap() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {}											\
 		template<typename TOperator> void visitProp( TOperator inOperator, valueStruct& inStruct ) { inOperator( inStruct.prop );	}	\
 	};
 	
diff --git a/src/3rdparty/PhysX/source/physxmetadata/extensions/include/PxExtensionMetaDataObjects.h b/src/3rdparty/PhysX/source/physxmetadata/extensions/include/PxExtensionMetaDataObjects.h
index 751c32d..ecb3531 100644
--- a/src/3rdparty/PhysX/source/physxmetadata/extensions/include/PxExtensionMetaDataObjects.h
+++ b/src/3rdparty/PhysX/source/physxmetadata/extensions/include/PxExtensionMetaDataObjects.h
@@ -58,7 +58,7 @@ struct PxExtensionsPropertyInfoName
 	template<> struct PxPropertyToValueStructMemberMap< PxExtensionsPropertyInfoName::type##_##prop >											\
 	{																																			\
 		PxU32 Offset;																															\
-		PxPropertyToValueStructMemberMap< PxExtensionsPropertyInfoName::type##_##prop >() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {}	\
+		PxPropertyToValueStructMemberMap() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {}													\
 		template<typename TOperator> void visitProp( TOperator inOperator, valueStruct& inStruct ) { inOperator( inStruct.prop );	}			\
 	};
 
diff --git a/src/3rdparty/PhysX/source/physxvehicle/src/physxmetadata/include/PxVehicleMetaDataObjects.h b/src/3rdparty/PhysX/source/physxvehicle/src/physxmetadata/include/PxVehicleMetaDataObjects.h
index 52fa902..5607044 100644
--- a/src/3rdparty/PhysX/source/physxvehicle/src/physxmetadata/include/PxVehicleMetaDataObjects.h
+++ b/src/3rdparty/PhysX/source/physxvehicle/src/physxmetadata/include/PxVehicleMetaDataObjects.h
@@ -55,7 +55,7 @@ struct PxVehiclePropertyInfoName
 	template<> struct PxPropertyToValueStructMemberMap< PxVehiclePropertyInfoName::type##_##prop >									\
 	{																																	\
 		PxU32 Offset;																													\
-		PxPropertyToValueStructMemberMap< PxVehiclePropertyInfoName::type##_##prop >() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {}	\
+		PxPropertyToValueStructMemberMap() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {}											\
 		template<typename TOperator> void visitProp( TOperator inOperator, valueStruct& inStruct ) { inOperator( inStruct.prop );	}	\
 	};
 
diff --git a/src/3rdparty/PhysX/source/pvd/include/PxPvdObjectModelBaseTypes.h b/src/3rdparty/PhysX/source/pvd/include/PxPvdObjectModelBaseTypes.h
index 8ebdb59..338de2d 100644
--- a/src/3rdparty/PhysX/source/pvd/include/PxPvdObjectModelBaseTypes.h
+++ b/src/3rdparty/PhysX/source/pvd/include/PxPvdObjectModelBaseTypes.h
@@ -255,7 +255,7 @@ struct PvdDataTypeToNamespacedNameMap
 	struct PvdDataTypeToNamespacedNameMap<type>                                                                        \
 	{                                                                                                                  \
 		NamespacedName Name;                                                                                           \
-		PvdDataTypeToNamespacedNameMap<type>() : Name("physx3", #type)                                                 \
+		PvdDataTypeToNamespacedNameMap() : Name("physx3", #type)                                                       \
 		{                                                                                                              \
 		}                                                                                                              \
 	};                                                                                                                 \
@@ -263,7 +263,7 @@ struct PvdDataTypeToNamespacedNameMap
 	struct PvdDataTypeToNamespacedNameMap<const type&>                                                                 \
 	{                                                                                                                  \
 		NamespacedName Name;                                                                                           \
-		PvdDataTypeToNamespacedNameMap<const type&>() : Name("physx3", #type)                                          \
+		PvdDataTypeToNamespacedNameMap() : Name("physx3", #type)                                                       \
 		{                                                                                                              \
 		}                                                                                                              \
 	};
@@ -287,7 +287,7 @@ inline NamespacedName getPvdNamespacedNameForType()
 	struct PvdDataTypeToNamespacedNameMap<type>                                                                        \
 	{                                                                                                                  \
 		NamespacedName Name;                                                                                           \
-		PvdDataTypeToNamespacedNameMap<type>() : Name(ns, name)                                                        \
+		PvdDataTypeToNamespacedNameMap() : Name(ns, name)                                                              \
 		{                                                                                                              \
 		}                                                                                                              \
 	};
@@ -297,7 +297,7 @@ inline NamespacedName getPvdNamespacedNameForType()
 	struct PvdDataTypeToNamespacedNameMap<newType>                                                                     \
 	{                                                                                                                  \
 		NamespacedName Name;                                                                                           \
-		PvdDataTypeToNamespacedNameMap<newType>() : Name(PvdDataTypeToNamespacedNameMap<oldType>().Name)               \
+		PvdDataTypeToNamespacedNameMap() : Name(PvdDataTypeToNamespacedNameMap<oldType>().Name)                        \
 		{                                                                                                              \
 		}                                                                                                              \
 	};
diff --git a/src/3rdparty/PhysX/source/pvd/src/PxProfileZoneImpl.h b/src/3rdparty/PhysX/source/pvd/src/PxProfileZoneImpl.h
index 0c57a3a..154ca2c 100644
--- a/src/3rdparty/PhysX/source/pvd/src/PxProfileZoneImpl.h
+++ b/src/3rdparty/PhysX/source/pvd/src/PxProfileZoneImpl.h
@@ -80,7 +80,7 @@ namespace physx { namespace profile {
 		PxProfileArray<PxProfileZoneClient*>			mZoneClients;
 		volatile bool									mEventsActive;
 
-		PX_NOCOPY(ZoneImpl<TNameProvider>)
+		PX_NOCOPY(ZoneImpl)
 	public:
 		ZoneImpl( PxAllocatorCallback* inAllocator, const char* inName, uint32_t bufferSize = 0x10000 /*64k*/, const TNameProvider& inProvider = TNameProvider() )
 			: TZoneEventBufferType( inAllocator, bufferSize, PxDefaultContextProvider(), NULL, PxProfileNullEventFilter() )
diff --git a/src/3rdparty/PhysX/source/pvd/src/PxPvdObjectModelInternalTypes.h b/src/3rdparty/PhysX/source/pvd/src/PxPvdObjectModelInternalTypes.h
index 4a0d8a9..42b158e 100644
--- a/src/3rdparty/PhysX/source/pvd/src/PxPvdObjectModelInternalTypes.h
+++ b/src/3rdparty/PhysX/source/pvd/src/PxPvdObjectModelInternalTypes.h
@@ -81,7 +81,7 @@ struct PvdTypeToDataTypeMap
 	struct PvdDataTypeToNamespacedNameMap<type>                                                                        \
 	{                                                                                                                  \
 		NamespacedName Name;                                                                                           \
-		PvdDataTypeToNamespacedNameMap<type>() : Name("physx3_debugger_internal", #type)                               \
+		PvdDataTypeToNamespacedNameMap() : Name("physx3_debugger_internal", #type)                                     \
 		{                                                                                                              \
 		}                                                                                                              \
 	};
-- 
2.38.1