This has nothing to do with constructing std::string from char const*.

f expects a lvalue reference to a string, and by creating a temporary instance on the spot, you're providing an rvalue, which cannot be bound to a non-const lvalue reference. f(string{}) is just as invalid.