In C++, is it bad to pass a const bool by reference?

Viewed 15377

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.

6 Answers
Related