There is a certain program in which there are numerous conclusions to the console of various data for diagnostics, sometimes there are a lot of them, sometimes not. I want to make it possible to disable the debug print of the bool variable, but it turns out an ugly code in each such message if (bool){cout << "blablabla";} .
Actually the question is how to implement such a function, given that the variables in cout can be a different number (1-99) and different types ( int , float , string , etc.)?
I tried something like this:
void Comment(string Args, ...) { тут вывод } But it is necessary to output both int and float variables and it is logical that errors appear ...