KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In a practical environment, using gcc or MS Visual Studio, is it bad to pass the value types which are the same size or less than an int by const reference ? i.e. is it bad to write such a function: void f(const bool& b); or void f(const char& c); rather than: void f(bool b); or void f(char c); The reason I am asking is that I do not see the benefit of passing a reference in these cases but maybe I am missing something.
Tags (comma-separated)
Save Edits
Cancel