Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes between Version 1 and Version 2 of docs/ftype

Show
Ignore:
Author:
KirkMcDonald (IP: 216.190.88.10)
Timestamp:
06/24/06 03:48:54 (18 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • docs/ftype

    v1 v2  
    33{{{ 
    44#!html 
     5<h1>pyd.ftype</h1> 
     6<!-- Generated by Ddoc from pyd\ftype.d --> 
     7This module contains templates for inferring the number of arguments, 
     8 the return type, and argument types of an arbitrary function pointer. 
     9<br><br> 
     10Portions of this module were automatically generated by Python modules. 
     11 
     12<br><br> 
     13<b>Authors:</b><br> 
     14Daniel Keep, Tomasz Stachowiak 
     15<br><br> 
     16<b>Date:</b><br> 
     17Fri Jun 23 20:44:59 2006 
     18 
     19  
     20<br><br> 
     21 
     22<dl><dt><big>template <u>NumberOfArgs</u>(Tf)</big></dt> 
     23<dd>Derives the number of arguments the passed function type accepts. It only 
     24 works on functions with 10 or fewer arguments. 
     25  
     26<br><br> 
     27 
     28<dl></dl> 
     29</dd> 
     30<dt><big>template <u>ReturnType</u>(T)</big></dt> 
     31<dd>Derives the return type of the passed function type. 
     32  
     33<br><br> 
     34 
     35<dl></dl> 
     36</dd> 
     37<dt><big>template <u>ArgType</u>(Tf,uint n)</big></dt> 
     38<dd>Derives the type of an individual argument of function Tf. 
     39<br><br> 
     40<b>Params:</b><br> 
     41<table><tr><td>Tf</td> 
     42<td>A function pointer type</td></tr> 
     43<tr><td>n</td> 
     44<td>The 1-indexed function argument to get the type of, e.g.: 
     45          <pre class="d_code">int func(int, char, real); 
     46static assert( is(char == ArgType(&func, 2)) );</pre></td></tr> 
     47</table><br> 
     48 
     49<dl></dl> 
     50</dd> 
     51</dl> 
    552}}}