When you use maximum("C","D"), the template parameter is char const*. You end up comparing two pointers. There is no guarantee which pointer will be greater. You have indeterminate behavior.
If you want to compare the string "C" and string "D", you can use:
cout << maximum(std::string("C"), std::string("D")) << endl; // or
cout << maximum("C"s, "D"s) << endl;                         // or
cout << maximum<std::string>("C", "D");
If you want compare just the characters C and D, you should use
cout << maximum('C', 'D') << endl;