• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Class template init_list</title>
5<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../../index.html" title="Boost.Test">
8<link rel="up" href="../../../../header/boost/test/data/monomorphic/initializer_list_hpp.html" title="Header &lt;boost/test/data/monomorphic/initializer_list.hpp&gt;">
9<link rel="prev" href="../../../../header/boost/test/data/monomorphic/initializer_list_hpp.html" title="Header &lt;boost/test/data/monomorphic/initializer_list.hpp&gt;">
10<link rel="next" href="init_lis_idm45267288087120.html" title="Class init_list&lt;bool&gt;">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../../../../header/boost/test/data/monomorphic/initializer_list_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../header/boost/test/data/monomorphic/initializer_list_hpp.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><a accesskey="n" href="init_lis_idm45267288087120.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="refentry">
26<a name="boost.unit_test.data.monomorphic.init_list"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class template init_list</span></h2>
29<p>boost::unit_test::data::monomorphic::init_list — Dataset view from an initializer_list or variadic template arguments. </p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../../header/boost/test/data/monomorphic/initializer_list_hpp.html" title="Header &lt;boost/test/data/monomorphic/initializer_list.hpp&gt;">boost/test/data/monomorphic/initializer_list.hpp</a>&gt;
33
34</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span>
35<span class="keyword">class</span> <a class="link" href="init_list.html" title="Class template init_list">init_list</a> <span class="special">{</span>
36<span class="keyword">public</span><span class="special">:</span>
37  <span class="comment">// types</span>
38  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">const_iterator</span> <a name="boost.unit_test.data.monomorphic.init_list.iterator"></a><span class="identifier">iterator</span><span class="special">;</span>
39
40  <span class="keyword">enum</span> <a name="boost.unit_test.data.monomorphic.init_list.@4"></a>@4 <span class="special">{</span> arity = = 1 <span class="special">}</span><span class="special">;</span>
41
42  <span class="comment">// <a class="link" href="init_list.html#boost.unit_test.data.monomorphic.init_listconstruct-copy-destruct">construct/copy/destruct</a></span>
43  <a class="link" href="init_list.html#idm45267288090848-bb"><span class="identifier">init_list</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">)</span><span class="special">;</span>
44  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="special">...</span> Args<span class="special">&gt;</span> <a class="link" href="init_list.html#idm45267288089536-bb"><span class="identifier">init_list</span></a><span class="special">(</span><span class="identifier">Args</span> <span class="special">&amp;&amp;</span><span class="special">...</span><span class="special">)</span><span class="special">;</span>
45
46  <span class="comment">// <a class="link" href="init_list.html#idm45267288094224-bb">public member functions</a></span>
47  <a class="link" href="../size_t.html" title="Class size_t">data::size_t</a> <a class="link" href="init_list.html#idm45267288093664-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
48  <span class="identifier">iterator</span> <a class="link" href="init_list.html#idm45267288092128-bb"><span class="identifier">begin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
49<span class="special">}</span><span class="special">;</span></pre></div>
50<div class="refsect1">
51<a name="idm46175621944448"></a><h2>Description</h2>
52<p>The data should be stored in the dataset, and since the elements are passed by an <code class="computeroutput">std::initializer_list</code> , it implies a copy of the elements. </p>
53<div class="refsect2">
54<a name="idm46175621943072"></a><h3>
55<a name="boost.unit_test.data.monomorphic.init_listconstruct-copy-destruct"></a><code class="computeroutput">init_list</code>
56        public
57       construct/copy/destruct</h3>
58<div class="orderedlist"><ol class="orderedlist" type="1">
59<li class="listitem">
60<pre class="literallayout"><a name="idm45267288090848-bb"></a><span class="identifier">init_list</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> il<span class="special">)</span><span class="special">;</span></pre>Constructor copies content of initializer_list. </li>
61<li class="listitem">
62<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="special">...</span> Args<span class="special">&gt;</span> <a name="idm45267288089536-bb"></a><span class="identifier">init_list</span><span class="special">(</span><span class="identifier">Args</span> <span class="special">&amp;&amp;</span><span class="special">...</span> args<span class="special">)</span><span class="special">;</span></pre>Variadic template initialization. </li>
63</ol></div>
64</div>
65<div class="refsect2">
66<a name="idm46175621924400"></a><h3>
67<a name="idm45267288094224-bb"></a><code class="computeroutput">init_list</code> public member functions</h3>
68<div class="orderedlist"><ol class="orderedlist" type="1">
69<li class="listitem">
70<pre class="literallayout"><a class="link" href="../size_t.html" title="Class size_t">data::size_t</a> <a name="idm45267288093664-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>dataset interface </li>
71<li class="listitem"><pre class="literallayout"><span class="identifier">iterator</span> <a name="idm45267288092128-bb"></a><span class="identifier">begin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
72</ol></div>
73</div>
74<div class="refsect2">
75<a name="idm46175621911872"></a><h3>Specializations</h3>
76<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="link" href="init_lis_idm45267288087120.html" title="Class init_list&lt;bool&gt;">Class init_list&lt;bool&gt;</a></p></li></ul></div>
77</div>
78</div>
79</div>
80<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
81<td align="left"></td>
82<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
83        Distributed under the Boost Software License, Version 1.0. (See accompanying
84        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
85      </p>
86</div></td>
87</tr></table>
88<hr>
89<div class="spirit-nav">
90<a accesskey="p" href="../../../../header/boost/test/data/monomorphic/initializer_list_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../header/boost/test/data/monomorphic/initializer_list_hpp.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><a accesskey="n" href="init_lis_idm45267288087120.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
91</div>
92</body>
93</html>
94