Presumably because istringstream implements a conversion to double, whereas string doesn't. So you convert the string Expr to an istringstream with "istringstream is(Expr)", then invoke istringstream::operator>>(double), which performs the conversion, with "is >> value".

A lot of C++ is about knowing your standard library.