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
Today I compiled libbarrett and I ran into the following compile error:
libbarrett/programs/autotension.cpp:553:63: error: redeclaration of ‘bool AutoTension<DOF>::engage(int, double)’ may not have default arguments [-fpermissive]
bool AutoTension<DOF>::engage(int motor, double timeout = 20.0) {
This error occurs because the default value for the argument timeout is in the function definition instead of the function declaration. From cppreference.com:
For member functions of class templates, all defaults must be provided in the initial declaration of the member function.
When changing the function declaration to (line 215)
bool engage(int motor, double timeout=20.0);
And removing the default value from the function definition (line 553):
Further development, including this bug fix, will show up there. We will try to keep GitHub up to date as we release new versions of libbarrett, but if you're interested in seeing the latest development as it happens, please check out the new link. Some of the highlights: the latest version uses Eigen3 instead of Eigen2, and we're working towards supporting Ubuntu 14.04 (pending testing).
kHi,
Today I compiled libbarrett and I ran into the following compile error:
This error occurs because the default value for the argument
timeout
is in the function definition instead of the function declaration. From cppreference.com:When changing the function declaration to (line 215)
And removing the default value from the function definition (line 553):
The problem was resolved.
Note that I'm used GCC 5.4.0 to compile
The text was updated successfully, but these errors were encountered: