Closed Ondraceq closed 1 year ago
I tried to implement fix myself, but i seems there is way more work to do than just removing <T>
eg. lot of stuff was removed in std::allocator
.
To be clear, the issue is addressing compilation of other projects that include the gazebo headers. For this, the removal of <T>
is sufficient (right now we have to hack it by adding the same file into include path before gazebo include paths).
Some of the <T>
were added in https://github.com/gazebosim/gazebo-classic/commit/21d233ff39d2c9e91fc7509620a06a5969695f73#diff-08e12ed58d000f7255113fa121fabb2db3b33836f4a001228300bef26420f1ddR112, so I guess they were related to some cppcheck check. Anyhow @Ondraceq if you like you can try to submit a PR to fix the problem, and then we can see if the CI jobs are passing or not.
The gazebo header files won't compile with
g++-11
with the-std=c++20
flag.It seems like gcc decided to change something in a weird way (it works with g++-10 and std20 - or - with g++-11 and std17), but when I looked at the errors, it shows:
I know that it shows
gazebo-9
, but I checked as well that the same problem is with the current version ingazebo11
(at d4dbf98).The problem as I understand it is that a templated class cannot have the template parameter repeated in the constructor - this was never allowed in c++.
Suggested fix
Remove the
<T>
from the constructors when the constructors themselves are not templated.