span class="n">outcome</span><span class="o">::</span><span class="n">result</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="p">;</span>
</code></pre></div><a href="https://github.com/boostorg/outcome/tree/master/doc/src/snippets/using_outcome.cpp#L36" class="code-snippet-url" target="_blank">View this code on Github</a></div>


<p>In <code>Layer2_old</code> we cannot use exceptions, so its function <code>h</code> uses return type <code>outcome&lt;&gt;</co