From 89f66ec05b3114a642e62223f0d71e8277a751b6 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson 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 struct A { A(); // error: simple-template-id not allowed for constructor A(int); // OK, injected-class-name used ~A(); // 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 BufferedPreallocatingPool : public PreallocatingPool { Ps::Array mDeletedElems; - PX_NOCOPY(BufferedPreallocatingPool) + PX_NOCOPY(BufferedPreallocatingPool) public: BufferedPreallocatingPool(PxU32 maxElements, const char* typeName) : PreallocatingPool(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 struct IsFlagsType > { const PxU32ToName* FlagData; - IsFlagsType > () : FlagData( PxEnumTraits().NameConversion ) {} + IsFlagsType() : FlagData( PxEnumTraits().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 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 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 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 \ { \ NamespacedName Name; \ - PvdDataTypeToNamespacedNameMap() : Name("physx3", #type) \ + PvdDataTypeToNamespacedNameMap() : Name("physx3", #type) \ { \ } \ }; \ @@ -263,7 +263,7 @@ struct PvdDataTypeToNamespacedNameMap struct PvdDataTypeToNamespacedNameMap \ { \ NamespacedName Name; \ - PvdDataTypeToNamespacedNameMap() : Name("physx3", #type) \ + PvdDataTypeToNamespacedNameMap() : Name("physx3", #type) \ { \ } \ }; @@ -287,7 +287,7 @@ inline NamespacedName getPvdNamespacedNameForType() struct PvdDataTypeToNamespacedNameMap \ { \ NamespacedName Name; \ - PvdDataTypeToNamespacedNameMap() : Name(ns, name) \ + PvdDataTypeToNamespacedNameMap() : Name(ns, name) \ { \ } \ }; @@ -297,7 +297,7 @@ inline NamespacedName getPvdNamespacedNameForType() struct PvdDataTypeToNamespacedNameMap \ { \ NamespacedName Name; \ - PvdDataTypeToNamespacedNameMap() : Name(PvdDataTypeToNamespacedNameMap().Name) \ + PvdDataTypeToNamespacedNameMap() : Name(PvdDataTypeToNamespacedNameMap().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 mZoneClients; volatile bool mEventsActive; - PX_NOCOPY(ZoneImpl) + 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 \ { \ NamespacedName Name; \ - PvdDataTypeToNamespacedNameMap() : Name("physx3_debugger_internal", #type) \ + PvdDataTypeToNamespacedNameMap() : Name("physx3_debugger_internal", #type) \ { \ } \ }; -- 2.38.1