robotology / robometry

Telemetry suite for logging data from your robot 🤖
https://robotology.github.io/robometry
Other
14 stars 9 forks source link

Compilation error when BufferManager is used without template and is member of a class #174

Closed Nicogene closed 2 years ago

Nicogene commented 2 years ago

I committed here a test that does not compile with this error:

/home/ngenesio/robotology/yarp-telemetry/test/BufferManagerTest.cpp:398:13: error: invalid use of template-name ‘robometry::BufferManager’ without an argument list
  398 |             robometry::BufferManager bm;
      |             ^~~~~~~~~
make[2]: *** [test/CMakeFiles/bufferManager_test.dir/build.make:76: test/CMakeFiles/bufferManager_test.dir/BufferManagerTest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:586: test/CMakeFiles/bufferManager_test.dir/all] Error 2

With BufferManager<int> or BufferManager<> it compiles without problem.

Note that if it is not nested in a struct or class BufferManager bm; is a legit declaration:

https://github.com/robotology/robometry/blob/14310e9a80c75eba987d647f02a91afe9f0c0512/test/BufferManagerTest.cpp#L360

This issue affects also releases v0.5.0 and v0.5.1

cc @traversaro @GiulioRomualdi @S-Dafarra

Nicogene commented 2 years ago

You can see the failure also in the CI: https://github.com/robotology/robometry/runs/6371615035?check_suite_focus=true

S-Dafarra commented 2 years ago

Since the change of name is already a breaking change, I would suggest removing the template parameter completely. It was initially needed to preserve backward compatibility, but I think that is gone anyway

S-Dafarra commented 2 years ago

I am working on a PR: https://github.com/robotology/robometry/pull/175

Nicogene commented 2 years ago

Fixed by #175