A result type for C++

I wrote my own version of the very useful ‘result type’ pattern for C++.