misc/mxnet: fix build with clang 19
Clang 19 now implements CWG 96 [1], which requires a template argument
list after a 'template' keyword, resulting in errors similar to:
/wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] 358 | template LaunchEx(s, new_oshape.Size(), req[0], lstride, rstride, oshape, | ^ /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:358:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] 389 | template LaunchEx(s, new_oshape.Size(), req[0], lstride, rstride, oshape, | ^ /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] /wrkdirs/usr/ports/misc/mxnet/work/incubator-mxnet-1.9.1/src/api/operator/numpy/../../../operator/numpy/../tensor/./elemwise_binary_broadcast_op.h:389:18: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
In all these cases, appending "<>" is enough to satisfy the constraint.
This can be done with a REINPLACE_CMD in the post-patch phase.
[1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
PR: 282654
Approved by: yuri (maintainer)
MFH: 2024Q4