Conditional based on variable type?

Okay so here's the overload attempt. So far it seems to be working okay. I'm aware that it says 'print' but actually serial prints the length. Once all of this is working properly it will not print the character lengths but will actually do the printing.

Can anyone see any faults, oversights, anything unnecessary?

(Comment in/out to do the various tests)

// Char pointer / Char array
void print(const char* cp) {
  uint16_t len = 0;
  while (1) {
    char c = *cp++;
    if (c == 0) break;
    len++;
  }
  Serial.println(len);
}

// String
void print(String &s) {
  uint16_t len = s.length();
  Serial.println(len);
}

// Flash String
void print(const __FlashStringHelper *ifsh) {
  PGM_P p = reinterpret_cast<PGM_P>(ifsh);
  size_t n = 0;
  while (1) {
    unsigned char c = pgm_read_byte(p++);
    if (c == 0) break;
    n++;
  }
  Serial.println(n);
}

// Integer
void print(const int& i) {
  char buffer[17];
  uint16_t len = sprintf(buffer, "%d", i);
  Serial.println(len);
}

// Float
void print (const float& f, int dec = 2) {
  if (dec > 17) return;

  char buffer[17] = {'\n'};

  dtostrf(f, 0, dec, buffer);

  char * cp = buffer;
  uint16_t len = 0;

  while (1) {
    char c = *cp++;
    if (c == 0) break;
    len++;
  }
  Serial.println(len);
}

// Double
void print (const double& f, int dec = 2) {
  if (dec > 17) return;

  char buffer[17] = {'\n'};

  dtostrf(f, 0, dec, buffer);

  char * cp = buffer;
  uint16_t len = 0;

  while (1) {
    char c = *cp++;
    if (c == 0) break;
    len++;
  }
  Serial.println(len);
}


void setup() {
  Serial.begin(115600);

  String x = "TEN CHARS!";
  // char* x = "TEN CHARS!";
  // char x[] = "TEN CHARS!";
  print(x);
  // print("TEN CHARS!");
  // print(F("TEN CHARS!"));

  // int x = 22222;
  // int x = -22222;
  // print(x);

  // float x = 49.8765432;
  // double x = 49.8765432;
  // Defaults to 2 decimal places unless specified such as below
  // print (x, 7);
}

void loop() { }