Kernel style guide has else on next line:

if () {
}
else {
}

I'm guilty of not following this consistently either.

However, this is another instance where I would just let the returns decrease the nesting level:

if (res["ok"]...)
    return c;

if (...) {
    // ...
    return simple
}

Also, what happens if we fall through this second check? Is the empty auto_ptr return at the end correct?