Setting of default parameters in subclasses

Registered by Garth Wells

Only set default argument values in header file of base class, not in subclasses, not in .cpp files

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
Accepted for 1.0.x
Implementation:
Implemented
Milestone target:
milestone icon 0.9.3
Started by
Anders Logg
Completed by
Anders Logg

Related branches

Sprints

Whiteboard

I've mostly looked at functions containing the virtual keyword (makes for easy grepping) + some other functions that I know use default arguments (like str).

So there might be some cases I've missed where subclasses inherit a virtual function but don't declare it as virtual. I think we should make it a rule to always declare inherited functions as virtual (like we do in generated UFC subclasses) so it's easy to spot.

I needed to add a new function transpmult in the linear algebra interfaces in order to remove the default bool argument for transposed multiplication.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.