<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>P0322r0 : exception_list</title>
<meta name="date" content="2016-04-24" />
<meta name="author" content="Bryce Adelstein Lelbach" />
<meta name="author" content="Alisdair Meredith" />
<meta name="author" content="Jared Hoberock" />
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0 }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "! important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 ! important }

.first {
  /* Override more specific margin styles with "! important". */
  margin-top: 0 ! important }

.last, .with-subtitle {
  margin-bottom: 0 ! important }

.hidden {
  display: none }

a.toc-backref {
  text-decoration: none ;
  color: black }

blockquote.epigraph {
  margin: 2em 5em ; }

dl.docutils dd {
  margin-bottom: 0.5em }

object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
  overflow: hidden;
}

/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
  font-weight: bold }
*/

div.abstract {
  margin: 2em 5em }

div.abstract p.topic-title {
  font-weight: bold ;
  text-align: center }

div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
  margin: 2em ;
  border: medium outset ;
  padding: 1em }

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
  font-weight: bold ;
  font-family: sans-serif }

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
  color: red ;
  font-weight: bold ;
  font-family: sans-serif }

/* Uncomment (and remove this text!) to get reduced vertical space in
   compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
  margin-bottom: 0.5em }

div.compound .compound-last, div.compound .compound-middle {
  margin-top: 0.5em }
*/

div.dedication {
  margin: 2em 5em ;
  text-align: center ;
  font-style: italic }

div.dedication p.topic-title {
  font-weight: bold ;
  font-style: normal }

div.figure {
  margin-left: 2em ;
  margin-right: 2em }

div.footer, div.header {
  clear: both;
  font-size: smaller }

div.line-block {
  display: block ;
  margin-top: 1em ;
  margin-bottom: 1em }

div.line-block div.line-block {
  margin-top: 0 ;
  margin-bottom: 0 ;
  margin-left: 1.5em }

div.sidebar {
  margin: 0 0 0.5em 1em ;
  border: medium outset ;
  padding: 1em ;
  background-color: #ffffee ;
  width: 40% ;
  float: right ;
  clear: right }

div.sidebar p.rubric {
  font-family: sans-serif ;
  font-size: medium }

div.system-messages {
  margin: 5em }

div.system-messages h1 {
  color: red }

div.system-message {
  border: medium outset ;
  padding: 1em }

div.system-message p.system-message-title {
  color: red ;
  font-weight: bold }

div.topic {
  margin: 2em }

h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
  margin-top: 0.4em }

h1.title {
  text-align: center }

h2.subtitle {
  text-align: center }

hr.docutils {
  width: 75% }

img.align-left, .figure.align-left, object.align-left {
  clear: left ;
  float: left ;
  margin-right: 1em }

img.align-right, .figure.align-right, object.align-right {
  clear: right ;
  float: right ;
  margin-left: 1em }

img.align-center, .figure.align-center, object.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.align-left {
  text-align: left }

.align-center {
  clear: both ;
  text-align: center }

.align-right {
  text-align: right }

/* reset inner alignment in figures */
div.align-right {
  text-align: inherit }

/* div.align-center * { */
/*   text-align: left } */

ol.simple, ul.simple {
  margin-bottom: 1em }

ol.arabic {
  list-style: decimal }

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

p.attribution {
  text-align: right ;
  margin-left: 50% }

p.caption {
  font-style: italic }

p.credits {
  font-style: italic ;
  font-size: smaller }

p.label {
  white-space: nowrap }

p.rubric {
  font-weight: bold ;
  font-size: larger ;
  color: maroon ;
  text-align: center }

p.sidebar-title {
  font-family: sans-serif ;
  font-weight: bold ;
  font-size: larger }

p.sidebar-subtitle {
  font-family: sans-serif ;
  font-weight: bold }

p.topic-title {
  font-weight: bold }

pre.address {
  margin-bottom: 0 ;
  margin-top: 0 ;
  font: inherit }

pre.literal-block, pre.doctest-block, pre.math, pre.code {
  margin-left: 2em ;
  margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}

span.classifier {
  font-family: sans-serif ;
  font-style: oblique }

span.classifier-delimiter {
  font-family: sans-serif ;
  font-weight: bold }

span.interpreted {
  font-family: sans-serif }

span.option {
  white-space: nowrap }

span.pre {
  white-space: pre }

span.problematic {
  color: red }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 80% }

table.citation {
  border-left: solid 1px gray;
  margin-left: 1px }

table.docinfo {
  margin: 2em 4em }

table.docutils {
  margin-top: 0.5em ;
  margin-bottom: 0.5em }

table.footnote {
  border-left: solid 1px black;
  margin-left: 1px }

table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
  padding-left: 0.5em ;
  padding-right: 0.5em ;
  vertical-align: top }

table.docutils th.field-name, table.docinfo th.docinfo-name {
  font-weight: bold ;
  text-align: left ;
  white-space: nowrap ;
  padding-left: 0 }

/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
  border: 0px;
  border-top: 2px solid;
  border-bottom: 2px solid;
  border-collapse: collapse;
}
table.docutils.booktabs * {
  border: 0px;
}
table.docutils.booktabs th {
  border-bottom: thin solid;
  text-align: left;
}

h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
  font-size: 100% }

ul.auto-toc {
  list-style-type: none }

</style>
</head>
<body>
<div class="document" id="p0322r0-exception-list">
<h1 class="title">P0322r0 : exception_list</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr class="field"><th class="docinfo-name">Project:</th><td class="field-body">ISO JTC1/SC22/WG21: Programming Language C++</td>
</tr>
<tr class="field"><th class="docinfo-name">Number:</th><td class="field-body">P0322r0</td>
</tr>
<tr><th class="docinfo-name">Date:</th>
<td>2016-04-24</td></tr>
<tr class="field"><th class="docinfo-name">Reply-to:</th><td class="field-body"><a class="reference external" href="mailto:balelbach&#64;lbl.gov">balelbach&#64;lbl.gov</a></td>
</tr>
<tr><th class="docinfo-name">Author:</th>
<td>Bryce Adelstein Lelbach</td></tr>
<tr><th class="docinfo-name">Contact:</th>
<td><a class="first last reference external" href="mailto:balelbach&#64;lbl.gov">balelbach&#64;lbl.gov</a></td></tr>
<tr><th class="docinfo-name">Author:</th>
<td>Alisdair Meredith</td></tr>
<tr><th class="docinfo-name">Contact:</th>
<td><a class="first last reference external" href="mailto:alisdairm&#64;me.com">alisdairm&#64;me.com</a></td></tr>
<tr><th class="docinfo-name">Author:</th>
<td>Jared Hoberock</td></tr>
<tr><th class="docinfo-name">Contact:</th>
<td><a class="first last reference external" href="mailto:jhoberock&#64;nvidia.com">jhoberock&#64;nvidia.com</a></td></tr>
<tr class="field"><th class="docinfo-name">Audience:</th><td class="field-body">Library Evolution Working Group (LEWG)</td>
</tr>
<tr class="field"><th class="docinfo-name">Audience:</th><td class="field-body">Study Group 1 - Concurrency (SG1) for concurrency concerns and integration with the Parallelism TS</td>
</tr>
<tr class="field"><th class="docinfo-name">URL:</th><td class="field-body"><a class="reference external" href="https://git.io/vrP2Q">https://git.io/vrP2Q</a></td>
</tr>
</tbody>
</table>
<div class="section" id="motivation">
<h1>1&nbsp;&nbsp;&nbsp;Motivation</h1>
<p>The Parallelism TS specifies <tt class="docutils literal">exception_list</tt>, a class which owns a sequence
of <tt class="docutils literal">exception_ptr</tt> objects. <tt class="docutils literal">exception_list</tt> is used to report exceptions
that are thrown during the execution of a standard parallel algorithm.
<tt class="docutils literal">exception_list</tt> in the Parallelism TS specifies a query interface, but has
no interface for constructing and populating the object.</p>
<p>At Jacksonville, there was interest in seeing the <tt class="docutils literal">exception_list</tt> class from
the Parallelism TS be elaborated into a more general-purpose and usable type.
In particular, we want <tt class="docutils literal">exception_list</tt> to have interfaces for construction
which make it possible for standard library users to utilize exception_list in
their own code.</p>
</div>
<div class="section" id="design">
<h1>2&nbsp;&nbsp;&nbsp;Design</h1>
<p>While exploring the design of <tt class="docutils literal">exception_list</tt>, our major question was should
<tt class="docutils literal">exception_list</tt> be mutable or immutable after construction. The pros of both
options are:</p>
<ul class="simple">
<li>Immutable<ul>
<li>Existing exception types are immutable.</li>
<li>An immutable design negates many of our concerns regarding the use of
<tt class="docutils literal">exception_list</tt> in a multi-threaded context.</li>
</ul>
</li>
<li>Mutable<ul>
<li>Existing standard library containers are mutable.</li>
<li>The standard library doesn't currently have a design for immutable
containers and we will not have sufficient time before C++17 to full explore
this design space.</li>
<li>A simple, non-concurrent mutable <tt class="docutils literal">exception_list</tt> has decreased space and
time overhead when compared to an immutable <tt class="docutils literal">exception_list</tt>.</li>
</ul>
</li>
</ul>
<p>We decided upon an immutable design. The precedence for immutability in existing
exception types was the major deciding factor. We did not wish to introduce a
new standard exception type which had substantially different semantics from
existing exception types.</p>
<p>Additionally, some of the authors had strong concerns about potential data
races with <tt class="docutils literal">exception_list</tt> which are alleviated by the immutable design.
An immutable <tt class="docutils literal">exception_list</tt> would be a persistent structure (e.g. older
versions of the container would be preserved on &quot;insertion&quot; or &quot;removal).</p>
<!-- To further our goal of picking a design free from thread-safety caveats, we
have decided to delete the move constructor of ``exception_list``, providing
only a copy constructor. Although it is outside of the scope of this paper,
the authors note that ``exception``'s move constructor is not deleted, which
we believe risks race conditions in catch blocks during multi-threaded
execution. -->
<p>A reference-counted tree-like structure can be used to implement our immutable
<tt class="docutils literal">exception_list</tt>, similar to the implementation of immutable sequences via
<a class="reference external" href="http://www.staff.city.ac.uk/~ross/papers/FingerTree.html">2-3 finger trees</a>
in languages such as Haskell. Such structures allow for constant time access to
and insertion at the ends of the sequence and logarithmic time splitting and
concatenation.</p>
<p>If an immutable <tt class="docutils literal">exception_list</tt> is shipped, we do not believe it will be
possible to switch to a mutable design in the future. Such a switch would break
code (at runtime) that was written assuming that the type was immutable.</p>
<p>A draft specification for an immutable <tt class="docutils literal">exception_list</tt> with a constructor-based
interface for concatenation. We have deleted the move constructor and move assignment operator;
these operations seem nonsensical for an immutable, persistent data structure
where copying is cheap and moving would have to leave the moved-from object in
an unchanged state (otherwise, it would no longer be truly immutable and thus
would be susceptible to thread-safety issues).</p>
<p>Note that complexity guarantees in the below specification are based on a
theoretical implementation using 2-3 finger trees.</p>
</div>
<div class="section" id="specification">
<h1>3&nbsp;&nbsp;&nbsp;Specification</h1>
<pre class="code c++ literal-block">
<span class="keyword">namespace</span> <span class="name">std</span> <span class="punctuation">{</span>

<span class="keyword">class</span> <span class="name class">exception_list</span> <span class="operator">:</span> <span class="keyword">public</span> <span class="name">exception</span>
<span class="punctuation">{</span>
  <span class="keyword">public</span><span class="operator">:</span>
    <span class="keyword">typedef</span> <span class="comment multiline">/*** unspecified ***/</span> <span class="name">iterator</span><span class="punctuation">;</span>
    <span class="keyword">typedef</span> <span class="comment multiline">/*** unspecified ***/</span> <span class="name">size_type</span><span class="punctuation">;</span>

    <span class="comment single">/////////////////////////////////////////////////////////////////////////
</span>    <span class="comment single">// CONSTRUCTORS
</span>
    <span class="keyword">constexpr</span> <span class="name function">exception_list</span><span class="punctuation">()</span> <span class="keyword">noexcept</span> <span class="operator">=</span> <span class="keyword">default</span><span class="punctuation">;</span>

    <span class="name">exception_list</span><span class="punctuation">(</span><span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other</span><span class="punctuation">);</span>
    <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="keyword">operator</span><span class="operator">=</span><span class="punctuation">(</span><span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other</span><span class="punctuation">);</span>

    <span class="name">exception_list</span><span class="punctuation">(</span><span class="name">exception_list</span><span class="operator">&amp;&amp;</span><span class="punctuation">)</span> <span class="operator">=</span> <span class="keyword">delete</span>
    <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="keyword">operator</span><span class="operator">=</span><span class="punctuation">(</span><span class="name">exception_list</span><span class="operator">&amp;&amp;</span><span class="punctuation">)</span> <span class="operator">=</span> <span class="keyword">delete</span><span class="punctuation">;</span>

    <span class="comment single">// &quot;push_back&quot; constructors
</span>    <span class="name">exception_list</span><span class="punctuation">(</span><span class="name">exception_ptr</span> <span class="name">e</span><span class="punctuation">);</span>
    <span class="name">exception_list</span><span class="punctuation">(</span><span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other</span><span class="punctuation">,</span> <span class="name">exception_ptr</span> <span class="name">e</span><span class="punctuation">);</span>

    <span class="comment single">// iterator-pair &quot;insert&quot; constructors
</span>    <span class="name">exception_list</span><span class="punctuation">(</span><span class="name">iterator</span> <span class="name">first</span><span class="punctuation">,</span> <span class="name">iterator</span> <span class="name">last</span><span class="punctuation">);</span>
    <span class="name">exception_list</span><span class="punctuation">(</span><span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other</span><span class="punctuation">,</span>
                   <span class="name">iterator</span> <span class="name">first</span><span class="punctuation">,</span> <span class="name">iterator</span> <span class="name">last</span><span class="punctuation">);</span>
    <span class="keyword">template</span> <span class="operator">&lt;</span><span class="keyword">class</span> <span class="name class">InputIterator</span><span class="operator">&gt;</span>
    <span class="name">exception_list</span><span class="punctuation">(</span><span class="name">InputIterator</span> <span class="name">first</span><span class="punctuation">,</span> <span class="name">InputIterator</span> <span class="name">last</span><span class="punctuation">);</span>
    <span class="keyword">template</span> <span class="operator">&lt;</span><span class="keyword">class</span> <span class="name class">InputIterator</span><span class="operator">&gt;</span>
    <span class="name">exception_list</span><span class="punctuation">(</span><span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other</span><span class="punctuation">,</span>
                   <span class="name">InputIterator</span> <span class="name">first</span><span class="punctuation">,</span> <span class="name">InputIterator</span> <span class="name">last</span><span class="punctuation">);</span>

    <span class="comment single">// initializer-list &quot;insert&quot; constructors
</span>    <span class="name">exception_list</span><span class="punctuation">(</span><span class="name">initializer_list</span><span class="operator">&lt;</span><span class="name">exception_ptr</span><span class="operator">&gt;</span> <span class="name">list</span><span class="punctuation">);</span>
    <span class="name">exception_list</span><span class="punctuation">(</span><span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other</span><span class="punctuation">,</span>
                   <span class="name">initializer_list</span><span class="operator">&lt;</span><span class="name">exception_ptr</span><span class="operator">&gt;</span> <span class="name">list</span><span class="punctuation">);</span>

    <span class="comment single">// &quot;splice&quot; constructor
</span>    <span class="name">exception_list</span><span class="punctuation">(</span><span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other0</span><span class="punctuation">,</span>
                   <span class="keyword">const</span> <span class="name">exception_list</span><span class="operator">&amp;</span> <span class="name">other1</span><span class="punctuation">)</span> <span class="keyword">noexcept</span><span class="punctuation">;</span>

    <span class="comment single">/////////////////////////////////////////////////////////////////////////
</span>    <span class="comment single">// QUERY INTERFACE
</span>
    <span class="name">size_type</span> <span class="name function">size</span><span class="punctuation">()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="punctuation">;</span>

    <span class="name">iterator</span> <span class="name function">begin</span><span class="punctuation">()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="punctuation">;</span>
    <span class="name">iterator</span> <span class="name function">cbegin</span><span class="punctuation">()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="punctuation">;</span>

    <span class="name">iterator</span> <span class="name function">end</span><span class="punctuation">()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="punctuation">;</span>
    <span class="name">iterator</span> <span class="name function">cend</span><span class="punctuation">()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="punctuation">;</span>

    <span class="comment single">/////////////////////////////////////////////////////////////////////////
</span>
    <span class="keyword">const</span> <span class="keyword type">char</span><span class="operator">*</span> <span class="name function">what</span><span class="punctuation">()</span> <span class="keyword">const</span> <span class="keyword">noexcept</span> <span class="keyword">override</span><span class="punctuation">;</span>
<span class="punctuation">};</span>

<span class="punctuation">}</span>
</pre>
<!--  -->
<p>The class <tt class="docutils literal">exception_list</tt> owns a sequence of <tt class="docutils literal">exception_ptr</tt> objects.</p>
<p>The type <tt class="docutils literal"><span class="pre">exception_list::iterator</span></tt> shall fulfill the requirements of
<tt class="docutils literal">ForwardIterator</tt>.</p>
<p>The type <tt class="docutils literal"><span class="pre">exception_list::size_type</span></tt> shall be an unsigned integral type
large enough to represent the size of the sequence.</p>
<p><tt class="docutils literal">constexpr exception_list() noexcept = default;</tt></p>
<blockquote>
<em>Effect</em>: Construct an empty <tt class="docutils literal">exception_list</tt>.</blockquote>
<p><tt class="docutils literal">exception_list(const exception_list&amp; other);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which is a copy of <tt class="docutils literal">other</tt>.</p>
<p><em>Complexity</em>: Linear time in the size of <tt class="docutils literal">other</tt>.</p>
<p><em>Complexity</em>: Constant time.</p>
</blockquote>
<p><tt class="docutils literal">exception_list&amp; <span class="pre">operator=(const</span> exception_list&amp; other);</tt></p>
<blockquote>
<p><em>Effect</em>: Copy the contents of <tt class="docutils literal">other</tt> into this <tt class="docutils literal">exception_list</tt>.</p>
<p><em>Complexity</em>: Linear time in the size of <tt class="docutils literal">other</tt>.</p>
<p><em>Complexity</em>: Constant time.</p>
</blockquote>
<p><tt class="docutils literal">exception_list(exception_ptr e);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which contains a single element,
<tt class="docutils literal">e</tt>.</p>
<p><em>Complexity</em>: Constant time.</p>
</blockquote>
<p><tt class="docutils literal">exception_list(const exception_list&amp; other, exception_ptr e);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which is a copy of <tt class="docutils literal">other</tt>,
and append <tt class="docutils literal">e</tt> to the end of the owned sequence.</p>
<p><em>Complexity</em>: Linear in the size of <tt class="docutils literal">other</tt> + 1.</p>
<p><em>Complexity</em>: Constant time.</p>
</blockquote>
<p><tt class="docutils literal">exception_list(iterator first, iterator last);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which contains
<tt class="docutils literal">distance(first, last)</tt> elements from the range <tt class="docutils literal">[first, last)</tt>.</p>
<p><em>Complexity</em>: Logarthmic in <tt class="docutils literal">distance(first, last)</tt>.</p>
</blockquote>
<p><tt class="docutils literal">exception_list(const exception_list&amp; other, iterator first, iterator last);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which is a copy of <tt class="docutils literal">other</tt>,
and append the range <tt class="docutils literal">[first, last)</tt> to the end of the owned sequence.</p>
<p><em>Complexity</em>: Logarthmic in <tt class="docutils literal"><span class="pre">min(other.size(),</span> distance(first, last))</tt>.</p>
</blockquote>
<p><tt class="docutils literal">template &lt;class InputIterator&gt;</tt></p>
<p><tt class="docutils literal">exception_list(InputIterator first, InputIterator last);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which contains
<tt class="docutils literal">distance(first, last)</tt> elements from the range <tt class="docutils literal">[first, last)</tt>.</p>
<p><em>Complexity</em>: Linear in <tt class="docutils literal">distance(first, last)</tt>.</p>
<p><em>Remarks</em>: This constructor shall not participate in overload resolution if
<tt class="docutils literal"><span class="pre">is_convertible_v&lt;InputIterator::value_type,</span> exception_ptr&gt; == false</tt>.</p>
</blockquote>
<p><tt class="docutils literal">template &lt;class InputIterator&gt;</tt></p>
<p><tt class="docutils literal">exception_list(const exception_list&amp; other, InputIterator first, InputIterator last);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which is a copy of <tt class="docutils literal">other</tt>,
and append the range <tt class="docutils literal">[first, last)</tt> to the end of the owned sequence.</p>
<p><em>Complexity</em>: Linear in <tt class="docutils literal">distance(first, last)</tt>.</p>
<p><em>Remarks</em>: This constructor shall not participate in overload resolution if
<tt class="docutils literal"><span class="pre">is_convertible_v&lt;InputIterator::value_type,</span> exception_ptr&gt; == false</tt>.</p>
</blockquote>
<p><tt class="docutils literal">exception_list(initializer_list&lt;exception_ptr&gt; list);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which contains <tt class="docutils literal">list.size()</tt>
elements from <tt class="docutils literal">list</tt>.</p>
<p><em>Complexity</em>: Linear in the size of <tt class="docutils literal">list</tt>.</p>
</blockquote>
<p><tt class="docutils literal">exception_list(const exception_list&amp; other, initializer_list&lt;exception_ptr&gt; list);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which is a copy of <tt class="docutils literal">other</tt>,
and append <tt class="docutils literal">list</tt> to the end of the owned sequence.</p>
<p><em>Complexity</em>: Linear in the size of <tt class="docutils literal">list</tt>.</p>
</blockquote>
<p><tt class="docutils literal">exception_list(const exception_list&amp; other0, const exception_list&amp; other1);</tt></p>
<blockquote>
<p><em>Effect</em>: Construct a new <tt class="docutils literal">exception_list</tt> which contains all the elements
of <tt class="docutils literal">other0</tt> followed by all the elements of <tt class="docutils literal">other1</tt>.</p>
<p><em>Complexity</em>: Logarthmic in the <tt class="docutils literal"><span class="pre">min(other0.size(),</span> <span class="pre">other1.size())</span></tt>.</p>
</blockquote>
<p><tt class="docutils literal">size_type size() const noexcept;</tt></p>
<blockquote>
<p><em>Returns</em>: The number of <tt class="docutils literal">exception_ptr</tt> objects contained within the
<tt class="docutils literal">exception_list</tt>.</p>
<p><em>Complexity</em>: Constant time.</p>
</blockquote>
<p><tt class="docutils literal">iterator begin() const noexcept;</tt></p>
<p><tt class="docutils literal">iterator cbegin() const noexcept;</tt></p>
<blockquote>
<em>Returns</em>: An iterator referring to the first <tt class="docutils literal">exception_ptr</tt> object
contained within the <tt class="docutils literal">exception_list</tt>.</blockquote>
<p><tt class="docutils literal">iterator end() const noexcept;</tt></p>
<p><tt class="docutils literal">iterator cend() const noexcept;</tt></p>
<blockquote>
<em>Returns</em>: An iterator that is past the end of the owned sequence.</blockquote>
<p><tt class="docutils literal">const char* what() const noexcept override;</tt></p>
<blockquote>
<em>Returns</em>: An implementation-defined NTBS.</blockquote>
</div>
</div>
</body>
</html>
