Was bored and reading PRs when I saw this. There is no need to take a pointer argument solely for type deduction. You can be explicit when you call the function:
```
proto = fromstr<int64_t>(ver+7);
```

At least in the (type*)NULL case, this is cleaner. It would require that fromstr default the "pn" parameter to NULL.