You need to pass either a pointer-to-pointer to the function or a pointer reference and allocate with new
:
static bool parse(const std::string& input, MyClass *& result)
{
// ......
result = new MyClass(paramA, paramB)
return true;
}