An Foo:perator X() (where X is a type) is a conversion operator from Foo to X. There is no constraint that the type be a basic type (int, float, etc). It is also possible to provide conversions to class types by the same means.
// declaration of Foo from above
int y = x; // will invoke Foo::operator int(), so y will get a value of 42
float z = x; // will invoke Foo::operator float() so y will get a single-precision value of 42.0
y = (int)x; // explicitly invokes Foo::operator int()