exception_ptr.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
  2. 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
  4. <head>
  5. <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
  6. <title>exception_ptr</title>
  7. <link href='reno.css' type='text/css' rel='stylesheet'/>
  8. </head>
  9. <body>
  10. <div class="body-0">
  11. <div class="body-1">
  12. <div class="body-2">
  13. <div>
  14. <div id="boost_logo">
  15. <a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
  16. </div>
  17. <h1>Boost Exception</h1>
  18. </div>
  19. <!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
  20. <!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
  21. <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
  22. <div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>exception_ptr</h3>
  23. </div>
  24. <div class="RenoIncludeDIV"><p><span class="RenoEscape">&#35;<!--<wiki>`&#35;</wiki>--></span>include &lt;<span class="RenoLink"><a href="boost_exception_ptr_hpp.html">boost/exception_ptr.hpp</a></span>&gt;</p>
  25. <pre>namespace
  26. boost
  27. {
  28. <span class="RenoIncludeSPAN"> typedef ---unspecified--- <span class="RenoLink">exception_ptr</span>;</span>
  29. }</pre>
  30. </div><p>The <span class="RenoLink">exception_ptr</span> type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; <span class="RenoLink">exception_ptr</span>'s operations do not throw.</p>
  31. <p>The referenced object remains valid at least as long as there is an <span class="RenoLink">exception_ptr</span> object that refers to it.</p>
  32. <p>Two instances of <span class="RenoLink">exception_ptr</span> are equivalent and compare equal if and only if they refer to the same exception.</p>
  33. <p>The default constructor of <span class="RenoLink">exception_ptr</span> produces the null value of the type. The null value is equivalent only to itself.</p>
  34. <h4>Thread safety:</h4>
  35. <p>The <span class="RenoLink">exception_ptr</span> type is "as thread-safe as built-in types":</p>
  36. <div><ul><li> An <span class="RenoLink">exception_ptr</span> instance can be "read" simultaneously by multiple threads</li>
  37. <li> Different <span class="RenoLink">exception_ptr</span> instances can be "written to" simultaneously by multiple threads, even when these instances refer to the same exception object</li>
  38. </ul></div>
  39. <p>All other simultaneous accesses result in undefined behavior.</p>
  40. <h4>Nesting of exceptions:</h4>
  41. <p>An <span class="RenoLink">exception_ptr</span> can be added as <span class="RenoLink"><a href="error_info.html">error_info</a></span> to any boost::<span class="RenoLink"><a href="exception.html">exception</a></span>. This is a convenient way to nest exceptions. There is no limit on the depth of the nesting, however cyclic references result in undefined behavior.</p>
  42. </div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
  43. See also: <span class="RenoPageList"><a href="boost-exception.html">Boost Exception</a>&nbsp;| <a href="boost_exception_errinfo_nested_exception_hpp.html">boost/exception/errinfo_nested_exception.hpp</a>&nbsp;| <a href="boost_exception_ptr_hpp.html">boost/exception_ptr.hpp</a>&nbsp;| <a href="copy_exception.html">copy_exception</a>&nbsp;| <a href="current_exception.html">current_exception</a>&nbsp;| <a href="diagnostic_information.html">diagnostic_information</a>&nbsp;| <a href="enable_current_exception.html">enable_current_exception</a>&nbsp;| <a href="original_exception_type.html">original_exception_type</a>&nbsp;| <a href="rethrow_exception.html">rethrow_exception</a>&nbsp;| <a href="throw_exception.html">throw_exception</a>&nbsp;| <a href="unknown_exception.html">unknown_exception</a></span>
  44. </div>
  45. <!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
  46. <!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
  47. <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
  48. <div id="footer">
  49. <p>
  50. <a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
  51. <a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
  52. <small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
  53. Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
  54. </p>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </body>
  60. </html>