Passing arguments to LCD.print through another function I'd like to write a function like this:

void lcdPositionPrint(int row, int col,  content) {
    lcdPosition(row, col);
    LCD.print(content);
}


but I'm not certain how to declare "content", because it might be a string, or an int, or who knows what, just as it is for the "Serial.print" function or the LCD.print() function. Is there an easy way to do this?
One way to do this is to use generics. And we also need to use an unnamed namespace to get around the IDE's "helpfulness":

namespace {
    template&lt;typename T&gt;
    void lcdPositionPrint(int row, int col, T content) {
        lcdPosition(row, col);
        LCD.print(content);
    }
}


This will cause the compiler to create one function for each type passed in content that the function is actually called with.