You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clang version 19.1.4
Target: i686-w64-windows-gnu
Thread model: posix
Issue
When compiling my unit tests with clang 19 (switched from older clang version), the following error occurs:
../tools/fakeit/fakeit.hpp:7924:46: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
7924 | ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
My analysis
The problem has to do with template being improperly used?
A similar issue is discussed here: llvm/llvm-project#94194
It's stated that the issue is not with clang as it follows the standard.
The fix in the mentioned lib issue removes as far as I understand the template keyword before methods (of a template) being called.
In my local fakeIt copy, I removed the template keyboard ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
and my code builds again.
Used versions
FakeIt:
Generated: 2023-04-17 21:28:50.758101
Doctest :
2.4.11
Clang:
Issue
When compiling my unit tests with clang 19 (switched from older clang version), the following error occurs:
My analysis
The problem has to do with
template
being improperly used?A similar issue is discussed here: llvm/llvm-project#94194
It's stated that the issue is not with clang as it follows the standard.
The fix in the mentioned lib issue removes as far as I understand the template keyword before methods (of a template) being called.
In my local fakeIt copy, I removed the template keyboard
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
and my code builds again.
The line is still the same in latest version on github: https://github.com/eranpeer/FakeIt/blob/master/single_header/doctest/fakeit.hpp#L7924
Conclusion
This single change fixes my problem, but I think there are more occurences, e.g. here: https://github.com/eranpeer/FakeIt/blob/master/single_header/doctest/fakeit.hpp#L6248 or a bit different here https://github.com/eranpeer/FakeIt/blob/master/single_header/doctest/fakeit.hpp#L6248.
Unfortunately I am by not means a template meta programmer to know exactly what needs to be done to fix it completely.
The text was updated successfully, but these errors were encountered: