|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 All rights reserved. |
|
5 --> |
|
6 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd"> |
|
7 <reference xml:lang="en-us" outputclass="element" id="cxxFunctionTemplateParameters"> |
|
8 <title>cxxFunctionTemplateParameters</title> |
|
9 <shortdesc>Collects together the template parameters for template functions.</shortdesc> |
|
10 <refbody> |
|
11 <section id="section_BB16EAA97F01427CAFFFB15C63DEAC8D"> |
|
12 <title>Description</title><p>Collects together the template parameters for template functions.</p><p>See ISO/IEC 14882:2003(E) 14.1 Template parameters [temp.param]</p> |
|
13 </section> |
|
14 <example id="example_7637310D62AB4BDB88913D5B7CC94BDC"> |
|
15 <title>Example</title><p>Given this code:</p> |
|
16 <codeblock>/** |
|
17 @tparam T The type of the first function object. |
|
18 @tparam U The type of the second function object. |
|
19 @return 1 on success, 0 on failure. |
|
20 */ |
|
21 template<typename T, typename U> |
|
22 int templateFunction(T& x, U& y) |
|
23 { |
|
24 } |
|
25 </codeblock><p>Then function <tt>templateFunction |
|
26 </tt> would have the <tt>cxxFunctionTemplateParameters</tt> |
|
27 element:</p> |
|
28 <codeblock><cxxFunctionTemplateParameters> |
|
29 <cxxFunctionTemplateParameter> |
|
30 <cxxFunctionTemplateParameterType>typename T</cxxFunctionTemplateParameterType> |
|
31 <apiDefNote>The type of the first function object. </apiDefNote> |
|
32 </cxxFunctionTemplateParameter> |
|
33 <cxxFunctionTemplateParameter> |
|
34 <cxxFunctionTemplateParameterType>typename U</cxxFunctionTemplateParameterType> |
|
35 <apiDefNote>The type of the second function object. </apiDefNote> |
|
36 </cxxFunctionTemplateParameter> |
|
37 </cxxFunctionTemplateParameters> |
|
38 </codeblock><p>If the mandatory attributes are present they must be set thus:</p> |
|
39 <codeblock><cxxFunctionStorageClassSpecifierExtern name="extern" value="extern"/></codeblock> |
|
40 </example> |
|
41 <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-containedBy-section"/> |
|
42 <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-contains-section"/> |
|
43 <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-contentModel-section"/> |
|
44 <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-attList-section"/> |
|
45 <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-classValue-section"/> |
|
46 </refbody> |
|
47 </reference> |