Mellanox / libvma

Linux user space library for network socket acceleration based on RDMA compatible network adaptors
https://www.mellanox.com/products/software/accelerator-software/vma?mtag=vma
Other
573 stars 153 forks source link

Fix compilation with GCC 14 #1076

Closed yselkowitz closed 2 months ago

yselkowitz commented 3 months ago

Description

C++20 has changed the syntax for nested template constructors:

In file included from ../../src/vma/proto/mem_buf_desc.h:39,
                 from ../../src/vma/util/utils.h:47,
                 from vlogger.cpp:46:
../../src/vma/util/vma_list.h:210:31: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  210 |         vma_list_t<T, offset> (const vma_list_t<T, offset>& other) {
      |                               ^
../../src/vma/util/vma_list.h:210:31: note: remove the '< >'
What

Fixes compilation with GCC 14 and C++20.

Why ?

GCC 14 is the default compiler for RHEL 10 and Fedora 40, and newer.

Change type

What kind of change does this PR introduce?

Check list

swx-jenkins3 commented 3 months ago

Can one of the admins verify this patch?

igor-ivanov commented 3 months ago

@galnoam please handle

igor-ivanov commented 2 months ago

@galnoam @AlexanderGrissik please consider review fedora rawhide issue (https://src.fedoraproject.org/rpms/libvma/pull-request/3)

galnoam commented 2 months ago

@AlexanderGrissik, please review.

AlexanderGrissik commented 2 months ago

bot:retest

AlexanderGrissik commented 2 months ago

CI failed valgrind and is not related to the change. Known valgrind instability. The change is C++ syntax and passes CI on all other supported platforms.