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
We have several functions/methods that use std::vector<> as parameters. In some cases, we want to pass an empty vector so in order to fit with function signature we need to create an empty vector to be passed. This add extra complexity in the code.
Some alternatives:
Use NULL for these parameters. However, this may break coding style for these parameters which are read-only, as style mandates const& and NULL couldn't be used there.
Use a variant of the function will less parameters (which invokes in sequence the full-parameters version). We will need that empty vector, but only in one place (the function with few parameters calling the full parameters one).
The text was updated successfully, but these errors were encountered:
Raised #3301 (comment)
We have several functions/methods that use std::vector<> as parameters. In some cases, we want to pass an empty vector so in order to fit with function signature we need to create an empty vector to be passed. This add extra complexity in the code.
Some alternatives:
The text was updated successfully, but these errors were encountered: