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

template not allowed warning in parameter pack #972

Open
jputcu opened this issue Oct 29, 2024 · 5 comments
Open

template not allowed warning in parameter pack #972

jputcu opened this issue Oct 29, 2024 · 5 comments
Assignees

Comments

@jputcu
Copy link
Contributor

jputcu commented Oct 29, 2024

On etl-20.39.4 using ZakKemble avr-gcc-14 I get the following warning:

/include/etl/parameter_pack.h:141:56: warning: keyword 'template' not allowed in declarator-id [-Wpedantic]
  141 |   constexpr size_t parameter_pack<TTypes...>::template index_of_type<T>::value;
      |                                                        ^~~~~~~~~~~~~~~~

Note that this warning doesn't occur on avr-gcc-7.3

@jwellbelove
Copy link
Contributor

I think I've come across issues like this before where one compiler rejects it, and another requires it.

@jwellbelove
Copy link
Contributor

jwellbelove commented Nov 11, 2024

Can you try replacing parameter_pack.h with the one in this zip file?

parameter_pack.zip

@jwellbelove
Copy link
Contributor

jwellbelove commented Nov 11, 2024

Can you check both avr-gcc-7.3 & avr-gcc-14?

@jputcu
Copy link
Contributor Author

jputcu commented Nov 11, 2024

I just tried on both and the warning is gone now.
Would it be an idea to extend your CI to compile the unittests for AVR using the avr-g++7.3 (used by Arduino and Microchip)? This would catch many of the warnings I got in the past.
One step further could even be to run the unittests using an AVR simulator?

@jwellbelove
Copy link
Contributor

If I ever get the spare time, I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

2 participants