1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

science/step: Fix build with LLVM >= 19.1.0-rc1

Clang >= 19.1.0-rc1 requires a template argument list after an identifier
prefixed by the template keyword. [1]

/wrkdirs/usr/ports/science/step/work/step-23.08.5/stepcore/object.h:252:45:
error: a template argument list is expected after a name prefixed by the
template keyword [-Wmissing-template-arg-list-after-template-kw]
  252 |     if(!src || !src->metaObject()->template inherits(_Dst())) return NULL;

[1] f46d1463b8

Reported by:	pkg-fallout
MFH:		2024Q2
This commit is contained in:
Jason E. Hale 2024-10-30 02:43:09 -04:00
parent 59ad847eb2
commit f812d021d7

View File

@ -0,0 +1,21 @@
Clang >= 19.1.0-rc1 requires a template argument list after an identifier
prefixed by the template keyword. [1]
/wrkdirs/usr/ports/science/step/work/step-23.08.5/stepcore/object.h:252:45:
error: a template argument list is expected after a name prefixed by the
template keyword [-Wmissing-template-arg-list-after-template-kw]
252 | if(!src || !src->metaObject()->template inherits(_Dst())) return NULL;
[1] https://github.com/llvm/llvm-project/commit/f46d1463b835560d90ad3ac02b63c771e4ebe566
--- stepcore/object.h.orig 2024-02-10 03:35:30 UTC
+++ stepcore/object.h
@@ -249,7 +249,7 @@ _Dst stepcore_cast(_Src src) {
/** Casts between pointers to Object */
template<class _Dst, class _Src> // XXX: implement it better
_Dst stepcore_cast(_Src src) {
- if(!src || !src->metaObject()->template inherits(_Dst())) return NULL;
+ if(!src || !src->metaObject()->template inherits<_Dst>(_Dst())) return NULL;
return static_cast<_Dst>(src);
}