mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
boost::throw_exception documentation added.
[SVN r16239]
This commit is contained in:
parent
32fb45eba9
commit
1d601aef4d
@ -9,9 +9,8 @@
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1><IMG SRC="../../c++boost.gif" WIDTH="276" HEIGHT="86" align="center">Boost
|
||||
Utility Library</h1>
|
||||
<p>The Boost Utility Library isn't really a single library at all. It is just
|
||||
a collection for components too small to be called libraries in their own
|
||||
right.</p>
|
||||
<p>The Boost Utility Library isn't really a single library at all. It is just a
|
||||
collection for components too small to be called libraries in their own right.</p>
|
||||
<p>But that doesn't mean there isn't useful stuff here. Take a look:</p>
|
||||
<blockquote>
|
||||
<p><a href="base_from_member.html">base_from_member</a><br>
|
||||
@ -20,6 +19,7 @@
|
||||
<a href="compressed_pair.htm">compressed_pair.htm</a><br>
|
||||
<a href="operators.htm">operators.htm</a><br>
|
||||
<a href="tie.html">tie</a><br>
|
||||
<a href="throw_exception.html">throw_exception.html</a><br>
|
||||
<a href="utility.htm">utility.htm</a></p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
|
58
throw_exception.html
Normal file
58
throw_exception.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost: throw_exception.hpp documentation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
<body bgcolor="white" style="MARGIN-LEFT: 5%; MARGIN-RIGHT: 5%">
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
<td width="277">
|
||||
<img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" width="277" height="86">
|
||||
</td>
|
||||
<td align="middle">
|
||||
<h1>throw_exception.hpp</h1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="64"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
The header <STRONG><boost/throw_exception.hpp></STRONG> defines the
|
||||
helper function <STRONG>boost::throw_exception</STRONG>. It is intended to be
|
||||
used in Boost libraries that need to throw exceptions, but support
|
||||
configurations and platforms where exceptions aren't available, as indicated by
|
||||
the presence of the <STRONG>BOOST_NO_EXCEPTIONS</STRONG> <A href="../config/config.htm#macro_ref">
|
||||
configuration macro</A>.
|
||||
</p>
|
||||
<P>When <STRONG>BOOST_NO_EXCEPTIONS</STRONG> is not defined, <tt>boost::throw_exception(e)</tt>
|
||||
is equivalent to <tt>throw e</tt>. Otherwise, the function is left undefined,
|
||||
and the user is expected to supply an appropriate definition.</P>
|
||||
<h3><a name="Synopsis">Synopsis</a></h3>
|
||||
<pre>
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
|
||||
void throw_exception(std::exception const & e); // user defined
|
||||
|
||||
#else
|
||||
|
||||
template<class E> void throw_exception(E const & e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
</pre>
|
||||
<p><br>
|
||||
<small>Copyright © 2002 by Peter Dimov. Permission to copy, use, modify, sell and
|
||||
distribute this document is granted provided this copyright notice appears in
|
||||
all copies. This document is provided "as is" without express or implied
|
||||
warranty, and with no claim as to its suitability for any purpose.</small></p>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user