From 8ef8d44ed833ca92f1e203870411534bb9842430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Fri, 24 Aug 2001 10:41:01 +0000 Subject: [PATCH] Documented a new constructor for cons lists [SVN r10926] --- doc/tuple_advanced_interface.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/tuple_advanced_interface.html b/doc/tuple_advanced_interface.html index e578d6c..7ebd675 100644 --- a/doc/tuple_advanced_interface.html +++ b/doc/tuple_advanced_interface.html @@ -75,6 +75,19 @@ inline void set_to_zero(cons<H, T>& x) { x.get_head() = 0; set_to_zero

+

Constructing cons lists

+ +

+A cons list can be constructed from its head and tail. The prototype of the constructor is: +

cons(typename tuple_access_traits<head_type>::parameter_type h,
+     const tail_type& t)
+
+The traits template for the head parameter selects correct parameter types for different kinds of element types (for reference elements the parameter type equals the element type, for non-reference types the parameter type is a reference to const non-volatile element type). +

+

+For a one-element cons list the tail argument (null_type) can be omitted. +

+

Traits classes for tuple element types

tuple_access_traits