Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC] add a few missing template keywords #1447

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kedartal
Copy link

@kedartal kedartal commented Jul 12, 2024

Description

Add a few missing template keywords to fix compilation errors and warnings with a very recent clang 19 (probably due to this LLVM commit in this PR).

This PR only addresses the three specific ones that failed my compilation; more generally an expression of the form

this->base<T>::func()

for some base class template base with a member function func (CRTP) should probably be

this->template base<T>::func()

Example compilation error and warning:

...

In file included from .../include/tbb/combinable.h:17:
In file included from .../oneapi/tbb/combinable.h:22:
.../oneapi/tbb/enumerable_thread_specific.h:882:39: error: no member named 'table_clear' in the global namespace
  882 |         this->ets_base<ETS_key_type>::table_clear();
      |                                     ~~^
.../oneapi/tbb/enumerable_thread_specific.h:882:15: error: cannot refer to type member 'ets_base' in 'tbb::detail::d1::enumerable_thread_specific<T>' with '->'
  882 |         this->ets_base<ETS_key_type>::table_clear();
      |               ^
.../oneapi/tbb/combinable.h:33:7: note: in instantiation of member function 'tbb::detail::d1::enumerable_thread_specific<T>::~enumerable_thread_specific' requested here
   33 | class combinable {
      |       ^
.../oneapi/tbb/enumerable_thread_specific.h:103:7: note: member 'ets_base' declared here
  103 | class ets_base : detail::no_copy {
      |       ^

...

In file included from .../include/tbb/tbb.h:17:
In file included from .../oneapi/tbb.h:49:
In file included from .../include/oneapi/tbb/flow_graph.h:531:
.../include/oneapi/tbb/detail/_flow_graph_node_impl.h:34:22: warning: use 'template' keyword to treat 'item_buffer' as a dependent template name [-Wmissing-dependent-template-keyword]
   34 |         return this->item_buffer<T, A>::front();
      |                      ^
      |                      template 
...

Type of change

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

@kedartal
Copy link
Author

The newer gcc versions (11.4.0) succeed, while the older gcc versions (9.4.0 and 10.5.0) fail to compile. What is the minimum version of gcc the project aims to support?

I'm not sure about the other major compilers; we could always guard such changes with compiler versioning (something like this), please let me know if you want me to update the PR.

@dnmokhov
Copy link
Contributor

The newer gcc versions (11.4.0) succeed, while the older gcc versions (9.4.0 and 10.5.0) fail to compile. What is the minimum version of gcc the project aims to support?

I'm not sure about the other major compilers; we could always guard such changes with compiler versioning (something like this), please let me know if you want me to update the PR.

Please see https://github.com/oneapi-src/oneTBB/blob/master/SYSTEM_REQUIREMENTS.md#supported-compilers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants