<!DOCTYPE html>
<!-- Sources at https://github.com/cplusplus/fundamentals-ts -->
<html lang="en"><head><!--[if lte IE 8]><script>document.createElement("nav");document.createElement("section");document.createElement("time");document.createElement("CXX-TITLEPAGE");document.createElement("CXX-PROJECT-NUMBER");document.createElement("CXX-DOCNUM");document.createElement("CXX-REVISES");document.createElement("CXX-EDITOR");document.createElement("CXX-EMAIL");document.createElement("CXX-TOC");document.createElement("CXX-CLAUSE");document.createElement("CXX-SECTION");document.createElement("CXX-REF");document.createElement("CXX-FOOTNOTE");document.createElement("CXX-FOREIGN-INDEX");document.createElement("CXX-EDNOTE");document.createElement("CXX-EXAMPLE");document.createElement("CXX-NOTE");document.createElement("CXX-FUNCTION");document.createElement("CXX-SIGNATURE");document.createElement("CXX-REMARKS");document.createElement("CXX-EFFECTS");document.createElement("CXX-TERM");document.createElement("W-BR");document.createElement("CXX-RETURNS");document.createElement("CXX-POSTCONDITIONS");document.createElement("CXX-REQUIRES");document.createElement("CXX-RANGE");document.createElement("CXX-THROWS");document.createElement("CXX-COMPLEXITY");document.createElement("CXX-NOTES");document.createElement("CXX-EXCEPTION-SAFETY");document.createElement("CXX-FIGURE");document.createElement("CXX-PUBLISH-BUTTON");</script><![endif]--><style>template {display: none !important;} /* injected by platform.js */</style><style>body {transition: opacity ease-in 0.2s; } 
body[unresolved] {opacity: 0; display: block; overflow: hidden; } 
</style><style shim-shadowdom-css="">style { display: none !important; }
cxx-function {
	display: block; page-break-inside: avoid;
}

cxx-function:not(:last-child) {
	margin-bottom: 3ex;
}

cxx-function > dl {
	margin: 0px 0px 0px 2em;
}

cxx-function > pre {
	margin: 0px;
}cxx-signature {
	padding-left: 2em; display: block; text-indent: -2em;
}

cxx-signature.formatted {
	text-indent: 0px;
}cxx-attribute {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-attribute dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-attribute dd {
	margin-left: 0em;
}

cxx-attribute dd > ul, cxx-attribute dd > ol {
	clear: left;
}cxx-requires {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-requires dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-requires dd {
	margin-left: 0em;
}

cxx-requires dd > ul, cxx-requires dd > ol {
	clear: left;
}cxx-preconditions {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-preconditions dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-preconditions dd {
	margin-left: 0em;
}

cxx-preconditions dd > ul, cxx-preconditions dd > ol {
	clear: left;
}cxx-effects {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-effects dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-effects dd {
	margin-left: 0em;
}

cxx-effects dd > ul, cxx-effects dd > ol {
	clear: left;
}cxx-synchronization {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-synchronization dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-synchronization dd {
	margin-left: 0em;
}

cxx-synchronization dd > ul, cxx-synchronization dd > ol {
	clear: left;
}cxx-postconditions {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-postconditions dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-postconditions dd {
	margin-left: 0em;
}

cxx-postconditions dd > ul, cxx-postconditions dd > ol {
	clear: left;
}cxx-returns {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-returns dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-returns dd {
	margin-left: 0em;
}

cxx-returns dd > ul, cxx-returns dd > ol {
	clear: left;
}cxx-throws {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-throws dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-throws dd {
	margin-left: 0em;
}

cxx-throws dd > ul, cxx-throws dd > ol {
	clear: left;
}cxx-complexity {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-complexity dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-complexity dd {
	margin-left: 0em;
}

cxx-complexity dd > ul, cxx-complexity dd > ol {
	clear: left;
}cxx-exception-safety {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-exception-safety dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-exception-safety dd {
	margin-left: 0em;
}

cxx-exception-safety dd > ul, cxx-exception-safety dd > ol {
	clear: left;
}cxx-remarks {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-remarks dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-remarks dd {
	margin-left: 0em;
}

cxx-remarks dd > ul, cxx-remarks dd > ol {
	clear: left;
}cxx-error-conditions {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-error-conditions dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-error-conditions dd {
	margin-left: 0em;
}

cxx-error-conditions dd > ul, cxx-error-conditions dd > ol {
	clear: left;
}cxx-notes {
	display: block; margin-top: 0.5em; margin-bottom: 0.5em;
}

cxx-notes dt {
	float: left; font-style: italic; font-weight: normal; padding-right: 1ex;
}

cxx-notes dd {
	margin-left: 0em;
}

cxx-notes dd > ul, cxx-notes dd > ol {
	clear: left;
}cxx-section {
	display: block;
}

cxx-section:target {
	background-color: inherit;
}

cxx-section:target > section > h1 {
	background-color: rgb(255, 238, 221);
}

cxx-section header > h1 {
	display: inline; font-size: 100%;
}

cxx-section header {
	font-weight: bold; margin-top: 20px; margin-bottom: 20px; page-break-inside: avoid; page-break-after: avoid;
}

cxx-section header:after {
	clear: both; display: block; content: " "; height: 0px;
}cxx-clause {
	display: block;
}

cxx-clause:target {
	background-color: inherit;
}

cxx-clause:target > section > h1 {
	background-color: rgb(255, 238, 221);
}

cxx-clause header > h1 {
	display: inline; font-size: 100%;
}

cxx-clause header {
	font-weight: bold; margin-top: 20px; margin-bottom: 20px; page-break-inside: avoid; page-break-after: avoid;
}

cxx-clause header:after {
	clear: both; display: block; content: " "; height: 0px;
}[is=cxx-table] {
	margin-left: auto; margin-right: auto; border-collapse: collapse; border: thin solid black;
}

[is=cxx-table] caption {
	white-space: nowrap;
}

[is=cxx-table] caption caption {
	display: inline;
}

[is=cxx-table] th, [is=cxx-table] td {
	border-style: solid none; border-color: black; border-width: thin; padding: 0px 0.25em;
}

[is=cxx-table].column-rules th, [is=cxx-table].column-rules td {
	border-left-style: solid; border-right-style: solid;
}

[is=cxx-table] th {
	border-bottom: medium double;
}

[is=cxx-table].single-border th {
	border-bottom: thin solid;
}

[is=cxx-table].center td {
	text-align: center;
}

[is=cxx-table].list td {
	border: medium none; vertical-align: top;
}

[is=cxx-table].list ul {
	padding-left: 0px; margin: 0px;
}

[is=cxx-table].list ul li:before {
	content: "";
}cxx-figure {
	margin-left: auto; margin-right: auto;
}

cxx-figure figcaption {
	white-space: nowrap; text-align: center;
}

cxx-figure figcaption figcaption {
	display: inline;
}[is=cxx-definition-section] dt {
	font-weight: bold;
}

[is=cxx-definition-section] dd {
	margin-left: 0px;
}cxx-toc {
	display: block;
}

cxx-toc nav > ol {
	font-weight: bold;
}

cxx-toc ol {
	font-weight: normal; padding-left: 0px; margin-left: 0px;
}

cxx-toc li {
	list-style-type: none;
}

cxx-toc .marker {
	display: inline-block;
}

cxx-toc li .marker {
	width: 2em; text-align: left;
}

cxx-toc ol ol {
	margin-left: 2em;
}

cxx-toc li li .marker {
	width: 3em;
}

cxx-toc ol ol ol {
	margin-left: 3em;
}

cxx-toc li li li .marker {
	width: 3.5em;
}

cxx-toc ol ol ol ol {
	margin-left: 3.5em;
}

cxx-toc li li li li .marker {
	width: 4.5em;
}cxx-get-element-by-id {
	display: none;
}core-xhr {
	display: none;
}cxx-foreign-index {
	display: none;
}cxx-titlepage, cxx-titlepage .page {
	display: block; min-height: 100%;
}

cxx-titlepage .page {
	page-break-before: always; page-break-after: always; min-height: 100vh; margin-bottom: 2em;
}

@media print {
cxx-titlepage .page {
	height: 8.8in;
}


}

cxx-titlepage .page {
	position: relative;
}

cxx-titlepage table td, cxx-titlepage table th {
	border: medium none;
}

cxx-titlepagebody.cxx-draft .header, body.cxx-draft cxx-titlepage .header {
	position: absolute; right: 0px; top: 0px;
}

cxx-titlepagebody.cxx-draft h1, body.cxx-draft cxx-titlepage h1 {
	position: absolute; top: 40%; text-align: center;
}

cxx-titlepagebody.cxx-draft p.warning, body.cxx-draft cxx-titlepage p.warning {
	position: absolute; bottom: 5%;
}

cxx-titlepagebody.cxx-pdts .header, body.cxx-pdts cxx-titlepage .header {
	position: absolute; right: 0px; top: 0px; text-align: right;
}

cxx-titlepagebody.cxx-pdts .header cxx-docnum, body.cxx-pdts cxx-titlepage .header cxx-docnum {
	font-size: 150%;
}

cxx-titlepagebody.cxx-pdts hgroup, body.cxx-pdts cxx-titlepage hgroup {
	position: absolute; top: 30%;
}

cxx-titlepagebody.cxx-pdts hgroup *, body.cxx-pdts cxx-titlepage hgroup * {
	margin: 0px;
}

cxx-titlepagebody.cxx-pdts hgroup h1, body.cxx-pdts cxx-titlepage hgroup h1 {
	font-size: 150%; font-weight: bold;
}

cxx-titlepagebody.cxx-pdts hgroup h2, body.cxx-pdts cxx-titlepage hgroup h2 {
	font-size: 100%; font-weight: normal;
}

cxx-titlepagebody.cxx-pdts .footer, body.cxx-pdts cxx-titlepage .footer {
	position: absolute; left: 0px; bottom: 5%;
}

cxx-titlepagebody.cxx-pdts figure, body.cxx-pdts cxx-titlepage figure {
	border: 1px solid rgb(17, 17, 17); padding: 10px; margin-left: auto; margin-right: auto;
}

cxx-titlepagebody.cxx-pdts figcaption, body.cxx-pdts cxx-titlepage figcaption {
	text-align: center; font-weight: bold;
}

cxx-titlepagebody.cxx-pdts .warning, body.cxx-pdts cxx-titlepage .warning {
	position: absolute; bottom: 20%;
}

cxx-titlepagebody.cxx-pdts .copyright address, body.cxx-pdts cxx-titlepage .copyright address {
	font-style: normal; margin-left: 2em;
}

cxx-titlepagebody.cxx-pdts .copyright address a, body.cxx-pdts cxx-titlepage .copyright address a {
	color: inherit; text-decoration: inherit;
}

cxx-titlepage th {
	text-align: left; vertical-align: top;
}cxx-ednote {
	display: block;
}

cxx-ednotebody.cxx-pdts, body.cxx-pdts cxx-ednote {
	display: none;
}

cxx-ednote aside {
	float: right; max-width: 40%; margin: 1ex; border: 1px dashed rgb(136, 136, 136); padding: 1ex; background-color: rgb(238, 238, 238);
}

cxx-ednote.para aside {
	float: none; max-width: none;
}cxx-note .nowrap {
	white-space: nowrap;
}cxx-footnote {
	font-family: serif; white-space: normal; text-indent: initial;textIndent: initial; 
}

@media screen {
cxx-footnote aside {
	float: right; max-width: 30%; margin-left: 1em;
}


}

@media print {
cxx-footnote sup, cxx-footnote .marker {
	display: none;
}

aside {  }


}cxx-example {
	display: block;
}

cxx-example.inline {
	display: inline;
}

cxx-example .nowrap {
	white-space: nowrap;
}cxx-publish-button {
	display: block;
}cxx-codeblock {
	display: block;
}bnf-grammar {
	display: block; font-style: italic; margin-left: 0.35in;
}bnf-rule {
	display: block; margin-left: 0.6in;
}bnf-alt {
	display: block; margin-left: 1.2in;
}bnf-terminal {
	font-style: normal;
}w-br {
	white-space: normal;
}

w-br:after {
	content: "​";
}</style>
  <meta charset="utf-8">
  
  
<style shim-shadowdom-css="">/* Copyright 2014 Google Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

@page {
    margin: 10%;
    @top-left { content: "© ISO/IEC"; font-size: 10pt; }
    @top-right { content: string(docnum); font-weight: bold; font-size: 10pt; }
    @bottom-left { content: string(current-section, last); font-size: 10pt; }
    @bottom-right { content: counter(page); font-size: 10pt; }
}
@page :first {
    @top-left { content: "© ISO 2014 — All rights reserved"; }
    @top-right { content: normal; }
    @bottom-left { content: normal; }
    @bottom-right { content: normal; }
}

body { margin: 0; }

@media screen {
    body { max-width: 7in;
           /* Make room for paragraph numbers. */
           margin-left: 2em }
}

@media print {
    html { font-size: 10pt; }
    *   code { font-size: 80%; }
    /* Note that only Prince generates clickable links. */
    *   a[href] { text-decoration:none; }
}

@media screen {
    /* Needed to make the <cxx-titlepage>'s vertical spacing work.
       For print see the <cxx-titlepage> definition. */
    html, body {height: 100%}
}

cxx-docnum { string-set: docnum content(); }

cxx-clause { page-break-before: always; }
@media screen {
    cxx-clause, cxx-toc { margin-top: 3em; }
}

cxx-clause  header { font-size: 150%; }
cxx-toc  h1 { font-size: 150%; }
cxx-clause cxx-section  header { font-size: 117%; }
cxx-clause cxx-section cxx-section  header { font-size: 100%; }

[data-bookmark-label] { bookmark-label: attr(data-bookmark-label); }
h1 { bookmark-level: 1; }
cxx-toc  h1 { bookmark-level: 2; }
cxx-clause h1 { bookmark-level: 2; }
cxx-clause cxx-section h1 { bookmark-level: 3; }
cxx-clause cxx-section cxx-section h1 { bookmark-level: 4; }
/* The <h2> is a subtitle, which shouldn't get a PDF bookmark. */
cxx-titlepage  h2 { bookmark-level: none; }

*  .section-number { string-set: current-section "§ " content(); }

p {margin-top: .5em; margin-bottom: .5em}
p:first-child, ul, ol {margin-top: 0}

[para_num]::before { content: attr(para_num); float: left;
                     font-size: 70%; margin-left: -2.5em; width: 1.5em; text-align: right; }

del {text-decoration: line-through; color: #8B0040;}
ins {text-decoration: underline; color: #005100;}

pre {
    margin-left: 1em;
    margin-top: .5em;
    margin-bottom: .5em;
}

*   wbr::after {
    white-space: normal;
    content: '\200B';
}
*   code {
    /* Make inline code avoid line wraps unless we override it with <wbr>. */
    white-space: nowrap;
}
*   pre code {
    /* Keep block-code wrapping according to its context. */
    white-space: inherit;
}

*   table {
    border-collapse: collapse;
}
*   td, th {
    padding-left: .2em;
    padding-right: .2em;
    border: thin solid black;
}

/* Use an em-dash for the list bullet.
   'print' is a proxy for supporting ::marker. */
@media screen {
    ul {
        list-style: none;
        /* Relative positioning on the 'ul' lets the absolutely-positioned
           marker align relative to it.*/
        position: relative;
    }
    ul li:before {
        content: "\2014";
        position: absolute; left: 10px;
    }
}
@media print {
    ul li::marker {
        content: "\2014";
    }
    [is=cxx-table].list ul li::marker {
        content: none;
    }
}

/* This is here rather than inside elements/toc.html because browsers
   don't understand leader() or target-counter(), so they drop them
   inside the CSSOM. */
@media print {
    /* Generate page numbers in the table of contents. */
    cxx-toc  a[href]::after { content: leader(" . ") target-counter(attr(href), page); }

    cxx-footnote  aside { float: footnote; footnote-policy: line; }
}</style><title>Consolidated Revisions to C++ Extensions for Library Fundamentals</title></head>
<body class="cxx-draft">
<cxx-titlepage>
    
    
      <div class="page">
        <table class="header">
          
            <tr><th>Document Number:</th><td><cxx-docnum>N4270</cxx-docnum></td></tr>
          
          
            <tr><th>Date:</th><td><time>2014-11-07</time></td></tr>
          
          
            <tr><th>Revises:</th><td><cxx-revises><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4081.html">N4081</a></cxx-revises></td></tr>
          
          
            <tr><th>Author:</th><td><cxx-editor>
    Alisdair Meredith<br>
    Bloomberg LP<br>
    <cxx-email><a href="mailto:ameredith1@bloomberg.net">ameredith1@bloomberg.net</a></cxx-email>
  </cxx-editor></td></tr>
          
        </table>
        <h1>Consolidated Revisions to C++ Extensions for Library Fundamentals</h1>
      </div>
    

    
  </cxx-titlepage>

<cxx-toc>
    
    <nav>
      <h1>Contents</h1>
      
        
          <ol>           
            
              <li><span class="marker">4</span><a href="#func">Function objects</a>
        
          <ol>
                        
              <li><span class="marker">4.2</span><a href="#func.wrap.func">Class template function</a>
        
          <ol>
                        
              <li><span class="marker">4.2.2</span><a href="#func.wrap.func.mod">function modifiers</a>
        
      </li>
            
          </ol>
        
      </li>
            
              <li><span class="marker">4.3</span><a href="#func.searchers">Searchers</a>
        
          <ol>
            
              <li><span class="marker">4.3.2</span><a href="#func.searchers.boyer_moore">Class template boyer_moore_searcher</a>
        
      </li>
            
              <li><span class="marker">4.3.3</span><a href="#func.searchers.boyer_moore_horspool">Class template boyer_moore_horspool_searcher</a>
        
      </li>
            
          </ol>
        
      </li>
            
          </ol>
        
      </li>
            
              <li><span class="marker">5</span><a href="#optional">Optional objects</a>
        
          <ol>
            
              <li><span class="marker">5.1</span><a href="#optional.general">In general</a>
        
      </li>
            
              <li><span class="marker">5.2</span><a href="#optional.synop">Header &lt;experimental/optional&gt; synopsis</a>
        
      </li>
            
              <li><span class="marker">5.3</span><a href="#optional.object">optional for object types</a>
        
          <ol>
            
              <li><span class="marker">5.3.5</span><a href="#optional.object.observe">Observers</a>
        
      </li>
            
          </ol>
        
      </li>
            
          </ol>
        
      </li>
            
              <li><span class="marker">6</span><a href="#any">Class any</a>
        
          <ol>
            
              <li><span class="marker">6.1</span><a href="#any.synop">Header &lt;experimental/any&gt; synopsis</a>
        
      </li>
            
           
              <li><span class="marker">6.3</span><a href="#any.class">Class any</a>
        
          <ol>
            
              <li><span class="marker">6.3.1</span><a href="#any.cons">any construct/destruct</a>
        
      </li>
                       
          </ol>
        
      </li>
            
          
          </ol>
        
      </li>
                                
          </ol>

    </nav>
  </cxx-toc>


<cxx-clause id="func">
    

    <section>
      <header><span class="section-number">4</span> <h1 data-bookmark-label="4 Function objects">Function objects</h1> <span style="float:right"><a href="#func">[func]</a></span></header>
      
  
  <cxx-section id="func.wrap.func">
    

    <section>
      <header><span class="section-number">4.2</span> <h1 data-bookmark-label="4.2 Class template function">Class template <code>function</code></h1> <span style="float:right"><a href="#func.wrap.func">[func.wrap.func]</a></span></header>
      

    <cxx-section id="func.wrap.func.mod">
    

    <section>
      <header><span class="section-number">4.2.2</span> <h1 data-bookmark-label="4.2.2 function modifiers"><code>function</code> modifiers</h1> <span style="float:right"><a href="#func.wrap.func.mod">[func.wrap.func.mod]</a></span></header>
      
      

      <cxx-function para_num="1" id="func.wrap.func.mod.1">
    
    <pre><code><cxx-signature>void swap(function&amp; other);</cxx-signature></code></pre>

    <dl>
      
        
        <cxx-requires para_num="2" id="func.wrap.func.mod.2">
    
    <dt>Requires:</dt><dd><code>this-&gt;get_memory_resource() == other-&gt;get_memory_resource()</code>.</dd>
  </cxx-requires>

        <cxx-effects para_num="3" id="func.wrap.func.mod.3">
    
    <dt>Effects:</dt><dd>Interchanges the targets of <code>*this</code> and <code>other</code>.</dd>
  </cxx-effects>

<ins>      
         <cxx-remarks para_num="3" id="func.wrap.func.mod.3">
    
    <dt>Remark:</dt><dd>The allocators of <code>*this</code> and <code>other</code> are not interchanged.</dd>
  </cxx-remarks>
</ins>
      
    </dl>
  </cxx-function>
    
    </section>
  </cxx-section>
  
    </section>
  </cxx-section>

  <cxx-section id="func.searchers">

    <section>
      <header><span class="section-number">4.3</span> <h1 data-bookmark-label="4.3 Searchers">Searchers</h1> <span style="float:right"><a href="#func.searchers">[func.searchers]</a></span></header>
      
<ins>
    <p para_num="3" id="func.searchers.3">
The Boyer-Moore searcher implements the Boyer-Moore search algorithm. The Boyer-Moore-Horspool searcher implements theBoyer-Moore-Horspool search algorithm. In general, the Boyer-Moore searcher will use more memory and give better run-time performance than Boyer-Moore-Horspool.
    </p>
</ins>

    <cxx-section id="func.searchers.boyer_moore">
    

    <section>
      <header><span class="section-number">4.3.2</span> <h1 data-bookmark-label="4.3.2 Class template boyer_moore_searcher">Class template <code>boyer_moore_searcher</code></h1> <span style="float:right"><a href="#func.searchers.boyer_moore">[func.searchers.boyer_moore]</a></span></header>
      

      <cxx-function para_num="1" id="func.searchers.boyer_moore.1">
    
    <pre><code><cxx-signature>boyer_moore_searcher(RandomAccessIterator1 pat_first, RandomAccessIterator1 pat_last,
Hash hf = Hash(),
BinaryPredicate pred = BinaryPredicate());</cxx-signature></code></pre>

    <dl>
      
        <cxx-throws para_num="5" id="func.searchers.boyer_moore.5">
    
    <dt>Throws:</dt><dd>Any exception thrown by the copy constructor of <del><code>BinaryPredicate</code> or </del><code>RandomAccessIterator1</code>,
        or by the default constructor, copy constructor, or the copy assignment operator of the value type of <code>RandomAccessIterator1</code>,
        or the copy constructor or <code>operator()</code> of <ins><code>BinaryPredicate</code> or </ins><code>Hash</code>.
        May throw <code>bad_alloc</code> if cannot allocate additional memory for internal data structures needed.</dd>
  </cxx-throws>
      
    </dl>
    
    </section>
  </cxx-section>

    <cxx-section id="func.searchers.boyer_moore_horspool">
    

    <section>
      <header><span class="section-number">4.3.3</span> <h1 data-bookmark-label="4.3.3 Class template boyer_moore_horspool_searcher">Class template <code>boyer_moore_horspool_searcher</code></h1> <span style="float:right"><a href="#func.searchers.boyer_moore_horspool">[func.searchers.boyer_moore_horspool]</a></span></header>
      
      

<pre><code>
template&lt;class RandomAccessIterator1,
         class Hash = hash&lt;typename iterator_traits&lt;RandomAccessIterator1&gt;::value_type&gt;,
         class BinaryPredicate = equal_to&lt;&gt;&gt;
class boyer_moore_horspool_searcher {
public:
  boyer_moore_horspool_searcher(RandomAccessIterator1 pat_first, RandomAccessIterator1 pat_last,
                                <ins>Hash hf = Hash(), </ins>BinaryPredicate pred = BinaryPredicate());

  template&lt;class RandomAccessIterator2&gt;
  RandomAccessIterator2
  operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;

private:
  RandomAccessIterator1 pat_first_; <i>// exposition only</i>
  RandomAccessIterator1 pat_last_;  <i>// exposition only</i>
  Hash                  hash_;      <i>// exposition only</i>
  BinaryPredicate       pred_;      <i>// exposition only</i>
};
</code></pre>

      <cxx-function para_num="1" id="func.searchers.boyer_moore_horspool.1">
    
    <pre><code><cxx-signature>boyer_moore_horspool_searcher(
RandomAccessIterator1 pat_first, RandomAccessIterator1 pat_last,
Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());</cxx-signature></code></pre>

    <dl>
      
        <cxx-throws para_num="5" id="func.searchers.boyer_moore_horspool.5">
    
    <dt>Throws:</dt><dd>
          Any exception thrown by the copy constructor of <del><code>BinaryPredicate</code> or </del><code>RandomAccessIterator1</code>,
          or by the default constructor, copy constructor, or the copy assignment operator of the value type of <code>RandomAccessIterator1</code>
          or the copy constructor or <code>operator()</code> of <ins><code>BinaryPredicate</code> or </ins><code>Hash</code>.
          May throw <code>bad_alloc</code> if the system cannot allocate additional memory for internal data structures needed.
        </dd>
  </cxx-throws>
      
    </dl>
  </cxx-function>

    </section>
  </cxx-section>
  
    </section>
  </cxx-section>

    </section>
  </cxx-clause>

<cxx-clause id="optional">
    

    <section>
      <header><span class="section-number">5</span> <h1 data-bookmark-label="5 Optional objects">Optional objects</h1> <span style="float:right"><a href="#optional">[optional]</a></span></header>


  <cxx-section id="optional.object">
    

    <section>
      <header><span class="section-number">5.3</span> <h1 data-bookmark-label="5.3 optional for object types"><code>optional</code> for object types</h1> <span style="float:right"><a href="#optional.object">[optional.object]</a></span></header>
      
    

<pre><code>template &lt;class T&gt;
class optional
{

  <cxx-ref insynopsis="" to="optional.object.observe">// <i><a title="optional.object.observe" href="#optional.object.observe">5.3.5</a>, Observers</i></cxx-ref>
  constexpr T const* operator -&gt;() const;
  constexpr T* operator -&gt;();
  constexpr T const&amp; operator *() const &amp;;
  constexpr T&amp; operator *() &amp;;
  constexpr T<ins>&amp;&amp;</ins> operator *() &amp;&amp;;
  constexpr<ins> const</ins> T<ins>&amp;&amp;</ins> operator *() const &amp;&amp;;
  constexpr explicit operator bool() const noexcept;
  constexpr T const&amp; value() const &amp;;
  constexpr T&amp; value() &amp;;
  constexpr T<ins>&amp;&amp;</ins> value() &amp;&amp;;
  constexpr<ins> const</ins> T<ins>&amp;&amp;</ins> value() const &amp;&amp;;
  template &lt;class U&gt; constexpr T value_or(U&amp;&amp;) const &amp;;
  template &lt;class U&gt; constexpr T value_or(U&amp;&amp;) &amp;&amp;;

};</code></pre>




    <cxx-section id="optional.object.observe">
    
    <section>
      <header><span class="section-number">5.3.5</span> <h1 data-bookmark-label="5.3.5 Observers">Observers</h1> <span style="float:right"><a href="#optional.object.observe">[optional.object.observe]</a></span></header>
      
      

      <cxx-function para_num="11" id="optional.object.observe.11">
    
    <pre><code><cxx-signature>constexpr T<ins>&amp;&amp;</ins> operator*() &amp;&amp;;</cxx-signature><cxx-signature>constexpr<ins> const</ins> T<ins>&amp;&amp;</ins> operator*() const &amp;&amp;;</cxx-signature></code></pre>

    <dl>
      
        
        

        <cxx-requires para_num="12" id="optional.object.observe.12">
    
    <dt>Requires:</dt><dd><code>*this</code> contains a value</dd>
  </cxx-requires>
        <cxx-effects para_num="13" id="optional.object.observe.13">
    
    <dt>Effects:</dt><dd>Equivalent to <code>return std::move(*<var>val</var>);</code></dd>
  </cxx-effects>
<del>
        <cxx-remarks para_num="14" id="optional.object.observe.14">
    
    <dt>Remarks:</dt><dd>If <code>is_move_constructible_v&lt;T&gt;</code> is <code>false</code>, the program is ill-formed.</dd>
  </cxx-remarks>
</del>
      
    </dl>
  </cxx-function>

      <cxx-function para_num="15" id="optional.object.observe.15">
    
    <pre><code><cxx-signature>constexpr explicit operator bool() <ins>const </ins>noexcept;</cxx-signature></code></pre>
  </cxx-function>


      <cxx-function para_num="20" id="optional.object.observe.20">
    
    <pre><code><cxx-signature>constexpr T<ins>&amp;&amp;</ins> value() &amp;&amp;;</cxx-signature><cxx-signature>constexpr<ins> const</ins> T<ins>&amp;&amp;</ins> value() const &amp;&amp;;</cxx-signature></code></pre>

    <dl>
      
        
        

        <cxx-effects para_num="21" id="optional.object.observe.21">
    
    <dt>Effects:</dt><dd>Equivalent to <code>return bool(*this) ? std::move(*val) : throw bad_optional_access();</code></dd>
  </cxx-effects>
<del>
        <cxx-remarks para_num="22" id="optional.object.observe.22">
    
    <dt>Remarks:</dt><dd>If <code>is_move_constructible_v&lt;T&gt;</code> is <code>false</code>, the program is ill-formed.</dd>
  </cxx-remarks>
</del>
      
    </dl>
  </cxx-function>

    </section>
  </cxx-section>
  
    </section>
  </cxx-section>


    </section>
  </cxx-clause>

<cxx-clause id="any">
    

    <section>
      <header><span class="section-number">6</span> <h1 data-bookmark-label="6 Class any">Class <code>any</code></h1> <span style="float:right"><a href="#any">[any]</a></span></header>
      
  

  <cxx-section id="any.synop">
    

    <section>
      <header><span class="section-number">6.1</span> <h1 data-bookmark-label="6.1 Header <experimental/any> synopsis">Header &lt;experimental/any&gt; synopsis</h1> <span style="float:right"><a href="#any.synop">[any.synop]</a></span></header>
      
    

    <pre><code>namespace std {
namespace experimental {
inline namespace fundamentals_v1 {

  class any
  {
  public:
    <cxx-ref insynopsis="" to="any.cons">// <i><a title="any.cons" href="#any.cons">6.3.1</a>, any construct/destruct</i></cxx-ref>

    <del>template &lt;class Allocator&gt;
      any(allocator_arg_t, const Allocator&amp; a) noexcept;
    template &lt;class Allocator, class ValueType&gt;
      any(allocator_arg_t, const Allocator&amp; a, ValueType&amp;&amp; value);
    template &lt;class Allocator&gt;
        any(allocator_arg_t, const Allocator&amp; a, const any&amp; other);
    template &lt;class Allocator&gt;
        any(allocator_arg_t, const Allocator&amp; a, any&amp;&amp; other) noexcept;</del>

  };

} // namespace fundamentals_v1
} // namespace experimental
} // namespace std</code></pre>
  
    </section>
  </cxx-section>



  <cxx-section id="any.class">
    

    <section>
      <header><span class="section-number">6.3</span> <h1 data-bookmark-label="6.3 Class any">Class <code>any</code></h1> <span style="float:right"><a href="#any.class">[any.class]</a></span></header>
      

    <p para_num="3" id="any.class.3">
      Implementations should avoid the use of dynamically allocated memory for a small contained object.
      <cxx-example class="inline">
    
    <span class="nowrap">[ <em>Example:</em></span>
    where the object constructed is holding only an int.
    <span class="nowrap">— <em>end example</em> ]</span>
  </cxx-example>
      Such small-object optimization shall only be applied to <del>nothrow copyable types</del><ins>types <code>T</code> for which <code>is_nothrow_move_constructible_v&lt;T&gt;</code> is true</ins>.
    </p>

    <cxx-section id="any.cons">
    

    <section>
      <header><span class="section-number">6.3.1</span> <h1 data-bookmark-label="6.3.1 any construct/destruct"><code>any</code> construct/destruct</h1> <span style="float:right"><a href="#any.cons">[any.cons]</a></span></header>
      
      
      <cxx-function para_num="3" id="any.cons.3">
    
    <pre><code><cxx-signature>any(const any&amp; other);</cxx-signature></code></pre>

    <dl>
        <cxx-throws para_num="5" id="any.cons.5">
    
    <dt>Throws:</dt><dd>Any exceptions arising from <ins>calling </ins>the <del>copy</del><ins>selected</ins> constructor of the contained object.</dd>
  </cxx-throws>
      
    </dl>
  </cxx-function>


<del>
      <cxx-function para_num="15" id="any.cons.15">
    
    <pre><code><cxx-signature>template &lt;class Allocator&gt;
any(allocator_arg_t, const Allocator&amp; a) noexcept;</cxx-signature><cxx-signature>template &lt;class Allocator, class ValueType&gt;
any(allocator_arg_t, const Allocator&amp; a, ValueType&amp;&amp; value);</cxx-signature><cxx-signature>template &lt;class Allocator&gt;
any(allocator_arg_t, const Allocator&amp; a, const any&amp; other);</cxx-signature><cxx-signature>template &lt;class Allocator&gt;
any(allocator_arg_t, const Allocator&amp; a, any&amp;&amp; other) noexcept;</cxx-signature></code></pre>

    <dl>     

        <cxx-requires para_num="16" id="any.cons.16">
    
    <dt>Requires:</dt><dd><code>Allocator</code> shall meet the requirements for an Allocator (<cxx-ref in="cxx" to="allocator.requirements">C++14 <span title="allocator.requirements">§17.6.3.5</span></cxx-ref>).</dd>
  </cxx-requires>
        <cxx-effects para_num="17" id="any.cons.17">
    
    <dt>Effects:</dt><dd>Equivalent to the preceding constructors except that the contained object is constructed with uses-allocator construction (<cxx-ref in="cxx" to="allocator.uses.construction">C++14 <span title="allocator.uses.construction">§20.7.7.2</span></cxx-ref>) if memory allocation is performed.</dd>
  </cxx-effects>
      
    </dl>
  </cxx-function>
</del>

    
    </section>
  </cxx-section>


    </section>
  </cxx-clause>

</body></html>
