This is known as the "most vexing parse" of C++: what looks like an instance declaration to you actually looks like a function declaration to the compiler.
std::string name(); //function declaration
std::string name; //object declaration with default constructor
std::stringstream ss(std::string(buf)); //function declaration
std::stringstream ss(std::string buf); //another function declaration
std::stringstream ss(std::string); //also a function declaration
std::stringstream ss(std::string()); //ditto, argument names are optional
std::stringstream ss((std::string(buf))); //object declaration
Note the extra brackets in the last example. These brackets wouldn't be legal in a function declaration.
The first example with the default constructor is well-known. What adds unclarity in the second case is that brackets around parameter names in C++ are legal but optional. For example, you can define a function like this:
void foo(int (bar))
{}
Basically you'll run into this every time when all arguments to a constructor are temporaries from constructor invocations that take 0 or 1 arguments, and the quick solution is to put extra brackets around one of the arguments.