If a const string is initialized from a const char*. I assume that a temporary std::string object is created and the reference refers to the temporary object. Is it correct?
#include<string>
struct A{
const std::string& str_;
A(const std::string& o):str_(o){}
};
int main(){
A moshe{"moshe"};
}