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

warning with gcc14 on c++20 mode : warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor] #424

Closed
gvollant opened this issue May 11, 2024 · 5 comments

Comments

@gvollant
Copy link
Contributor

like simdjson/simdjson#2176

I've these warning when I compile using c++20 standard with gcc14


exterieur/simdutf/singleheader/simdutf.cpp:2835:37: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
 2835 |   simdutf_really_inline simd16<bool>() : base16() {}
      |                                     ^
exterieur/simdutf/singleheader/simdutf.cpp:2835:37: note: remove the '< >'
exterieur/simdutf/singleheader/simdutf.cpp:2836:37: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
 2836 |   simdutf_really_inline simd16<bool>(const __m256i _value) : base16<bool>(_value) {}
      |                                     ^
exterieur/simdutf/singleheader/simdutf.cpp:2836:37: note: remove the '< >'
exterieur/simdutf/singleheader/simdutf.cpp:2838:37: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
 2838 |   simdutf_really_inline simd16<bool>(bool _value) : base16<bool>(splat(_value)) {}
      |                                     ^
exterieur/simdutf/singleheader/simdutf.cpp:2838:37: note: remove the '< >'
exterieur/simdutf/singleheader/simdutf.cpp:3806:37: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
 3806 |   simdutf_really_inline simd16<bool>() : base16() {}
      |                                     ^
exterieur/simdutf/singleheader/simdutf.cpp:3806:37: note: remove the '< >'
exterieur/simdutf/singleheader/simdutf.cpp:3807:37: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
 3807 |   simdutf_really_inline simd16<bool>(const __m128i _value) : base16<bool>(_value) {}
      |                                     ^
exterieur/simdutf/singleheader/simdutf.cpp:3807:37: note: remove the '< >'
exterieur/simdutf/singleheader/simdutf.cpp:3809:37: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
 3809 |   simdutf_really_inline simd16<bool>(bool _value) : base16<bool>(splat(_value)) {}
      |                                     ^
exterieur/simdutf/singleheader/simdutf.cpp:3809:37: note: remove the '< >'

@lemire
Copy link
Member

lemire commented May 11, 2024

Do you still get this warning after PR #421?

@lemire
Copy link
Member

lemire commented May 12, 2024

I think that this has been fixed. If you still get a warning after running our most recent code, please open an issue.

@lemire lemire closed this as completed May 12, 2024
@gvollant
Copy link
Contributor Author

I have the warning with 5.2.8 which include PR #421
PR #421 modified simd8 but not simd16

@gvollant
Copy link
Contributor Author

I created PR #425 with fixes

@lemire
Copy link
Member

lemire commented May 12, 2024

Great!

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

No branches or pull requests

2 participants