added documentation for default construction of cons lists

[SVN r11017]
This commit is contained in:
Jaakko Järvi
2001-09-04 10:59:20 +00:00
parent 1c01745973
commit d427f6027d

View File

@ -77,6 +77,9 @@ inline void set_to_zero(cons<H, T>& x) { x.get_head() = 0; set_to_zero
<h4>Constructing cons lists</h4> <h4>Constructing cons lists</h4>
<p>
A cons list can be default constructed provided that all its elements can be default constructed.
</p>
<p> <p>
A cons list can be constructed from its head and tail. The prototype of the constructor is: A cons list can be constructed from its head and tail. The prototype of the constructor is:
<pre><code>cons(typename tuple_access_traits&lt;head_type&gt;::parameter_type h, <pre><code>cons(typename tuple_access_traits&lt;head_type&gt;::parameter_type h,
@ -88,6 +91,7 @@ The traits template for the head parameter selects correct parameter types for d
For a one-element cons list the tail argument (<code>null_type</code>) can be omitted. For a one-element cons list the tail argument (<code>null_type</code>) can be omitted.
</p> </p>
<h2>Traits classes for tuple element types</h2> <h2>Traits classes for tuple element types</h2>
<h4><code>tuple_access_traits</code></h4> <h4><code>tuple_access_traits</code></h4>