c++ - Constructor of class type returns a lvalue?

Viewed 792

Why does the first line not compile while the second line compiles?

float& t = float(10); // initial value of reference to non - const must be an lvalue
string& w = string("gg");

Does this imply that the string constructor returns a lvalue?

2 Answers
Related