As you can see, I’m incorrectly using the AUTO data type in the log function… But I think it demonstrates what I’m after. I’m trying to make a simple cout wrapper, and not sure how that would look for taking any data type.
void log(auto str = "DEFAULT LOG", bool b_endl = true)
{
std::cout << str; if (b_endl == true) { std::cout << std::endl; }
}
int main()
{
log("string");
log(3);
log(3.0);
return 0;
}