This is not an operator()
that returns a string
written in a strange way (as you probably thought), it is an implicit conversion operator that can be used to covert the X
type to a string
type:
X a;
string B = static_cast<string>(a);
Also, take a look at this question.