(Why) does an empty string have an address?
Every named object in C++ has an address. There is even a specific requirement that the size of every type be at least 1 so that T[N] and T[N+1] are different, or so that in T a, b; both variables have distinct addresses. In your case, s is a named object of type std::string, so it has an address., so it has an address.