Address unreachable code warning

In MSVC optional<T&>::value() emits a warning C4702: unreachable code because throw_exception is marked BOOST_RETURN.
Otherwise the ternary code might have been preferable.
This change addresses the warning while preserving the functionality. It replicates optional<T>::value() for consistency.
This commit is contained in:
gieseanw
2020-12-18 11:13:47 -06:00
committed by Andrzej Krzemienski
parent a7f49cbec8
commit ead529af54
45 changed files with 79 additions and 62 deletions

View File

@ -26,7 +26,7 @@
<span class="firstname">Fernando Luis</span> <span class="surname">Cacciola Carballal</span>
</h3></div></div>
<div><p class="copyright">Copyright © 2003-2007 Fernando Luis Cacciola Carballal</p></div>
<div><p class="copyright">Copyright © 2014-2018 Andrzej Krzemieński</p></div>
<div><p class="copyright">Copyright © 2014-2020 Andrzej Krzemieński</p></div>
<div><div class="legalnotice">
<a name="optional.legal"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
@ -145,7 +145,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: October 24, 2020 at 15:15:55 GMT</small></p></td>
<td align="left"><p><small>Last revised: December 18, 2020 at 22:54:39 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>