• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>use_default</title>
5<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../index.html" title="Chapter 1. Boost.Core">
8<link rel="up" href="../index.html" title="Chapter 1. Boost.Core">
9<link rel="prev" href="uncaught_exceptions.html" title="uncaught_exceptions">
10</head>
11<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
12<table cellpadding="2" width="100%"><tr>
13<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
14<td align="center"><a href="../../../../../index.html">Home</a></td>
15<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
16<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
17<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
18<td align="center"><a href="../../../../../more/index.htm">More</a></td>
19</tr></table>
20<hr>
21<div class="spirit-nav">
22<a accesskey="p" href="uncaught_exceptions.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
23</div>
24<div class="section">
25<div class="titlepage"><div><div><h2 class="title" style="clear: both">
26<a name="core.use_default"></a><a class="link" href="use_default.html" title="use_default">use_default</a>
27</h2></div></div></div>
28<div class="toc"><dl class="toc">
29<dt><span class="section"><a href="use_default.html#core.use_default.overview">Overview</a></span></dt>
30<dt><span class="section"><a href="use_default.html#core.use_default.example">Example</a></span></dt>
31<dt><span class="section"><a href="use_default.html#core.use_default.reference">Reference</a></span></dt>
32</dl></div>
33<div class="section">
34<div class="titlepage"><div><div><h3 class="title">
35<a name="core.use_default.overview"></a><a class="link" href="use_default.html#core.use_default.overview" title="Overview">Overview</a>
36</h3></div></div></div>
37<p>
38        The header &lt;boost/core/use_default.hpp&gt; provides the type <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">use_default</span></code> which is used by other Boost
39        libraries as a sentinel type in a templates to indicate defaults.
40      </p>
41</div>
42<div class="section">
43<div class="titlepage"><div><div><h3 class="title">
44<a name="core.use_default.example"></a><a class="link" href="use_default.html#core.use_default.example" title="Example">Example</a>
45</h3></div></div></div>
46<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base</span><span class="special">,</span>
47   <span class="keyword">class</span> <span class="identifier">Value</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">use_default</span><span class="special">,</span>
48   <span class="keyword">class</span> <span class="identifier">CategoryOrTraversal</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">use_default</span><span class="special">,</span>
49   <span class="keyword">class</span> <span class="identifier">Reference</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">use_default</span><span class="special">,</span>
50   <span class="keyword">class</span> <span class="identifier">Difference</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">use_default</span><span class="special">&gt;</span>
51<span class="keyword">class</span> <span class="identifier">iterator_adaptor</span><span class="special">;</span>
52
53<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
54<span class="keyword">class</span> <span class="identifier">node_iterator</span>
55    <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">iterator_adaptor</span><span class="special">&lt;</span><span class="identifier">node_iterator</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;,</span> <span class="identifier">Value</span><span class="special">*,</span>
56        <span class="identifier">boost</span><span class="special">::</span><span class="identifier">use_default</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">forward_traversal_tag</span><span class="special">&gt;;</span>
57</pre>
58</div>
59<div class="section">
60<div class="titlepage"><div><div><h3 class="title">
61<a name="core.use_default.reference"></a><a class="link" href="use_default.html#core.use_default.reference" title="Reference">Reference</a>
62</h3></div></div></div>
63<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
64  <span class="keyword">struct</span> <span class="identifier">use_default</span> <span class="special">{</span> <span class="special">};</span>
65<span class="special">}</span>
66</pre>
67</div>
68</div>
69<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
70<td align="left"></td>
71<td align="right"><div class="copyright-footer">Copyright © 2014 Peter Dimov<br>Copyright © 2014 Glen Fernandes<br>Copyright © 2014 Andrey Semashev<p>
72        Distributed under the <a href="http://boost.org/LICENSE_1_0.txt" target="_top">Boost
73        Software License, Version 1.0</a>.
74      </p>
75</div></td>
76</tr></table>
77<hr>
78<div class="spirit-nav">
79<a accesskey="p" href="uncaught_exceptions.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
80</div>
81</body>
82</html>
83