I am trying to assign a default value to a parameter in this function declaration:
bool gatt_db_service_set_active(struct gatt_db_attribute *attrib, bool active, int fd=0);
However, I am getting error
default argument given for parameter 3 of 'bool gatt_db_service_set_active(gatt_db_attribute*, bool, int)' [-fpermissive]
Then it says:
previous specification in 'bool gatt_db_service_set_active(gatt_db_attribute*, bool, int)' here: bool gatt_db_service_set_active(struct gatt_db_attribute *attrib, bool active, int fd;<
Which points to the same function declaration.
This is the definition:
bool gatt_db_service_set_active(struct gatt_db_attribute *attrib, bool active, int fd)
{
//stuff
}
As you can see I did not set the default parameter twice, as is the problem with most questions regarding this error. I am compiling this with gcc version 5.2.1 on Ubuntu 15.1
Does anyone know what is happening here?