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
add_param takes a std::string as an input, and add_params a std::initializer_list<char const* const>.
However it is easy to forget the final 's' or add an extra 's', and not realizing where the error comes from even after carefully reading the compilation error message. A missing/extra 's' is something easy to skip while reading the error message.
Why not having add_param and add_params taking both kind of parameters, or removing one function? The latter is certainly clearner but will brake some projects using the deleted function.
The text was updated successfully, but these errors were encountered:
Reference: adishavit#49
For ease-of-use, make the add_param method and the add_params method interchangeable. Allowing either to be called with multiple or single parameters.
Each of the newly created methods simply calls the original version, preventing the need for wide-spread changes in the future.
add_param takes a std::string as an input, and add_params a std::initializer_list<char const* const>.
However it is easy to forget the final 's' or add an extra 's', and not realizing where the error comes from even after carefully reading the compilation error message. A missing/extra 's' is something easy to skip while reading the error message.
Why not having add_param and add_params taking both kind of parameters, or removing one function? The latter is certainly clearner but will brake some projects using the deleted function.
The text was updated successfully, but these errors were encountered: