Fixing it up for C++ templates (and when function is not present)