Changeset 1379
- Timestamp:
- 12/14/09 08:05:09 (15 years ago)
- Files:
-
- trunk/docsrc/template.dd (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docsrc/template.dd
r1373 r1379 783 783 ) 784 784 785 785 <h2>$(LNAME2 function-templates, Function Templates)</h2> 786 786 787 787 $(P If a template declares exactly one member, and that member is a function 788 788 with the same name as the template: 789 789 ) 790 790 791 791 $(GRAMMAR 792 792 $(GNAME FunctionTemplateDeclaration): 793 $(I Type) $(I Identifier) $(B $(LPAREN)) $(I TemplateParameterList) $(B $(RPAREN)) $(B $(LPAREN)) $( I FunctionParameterList) $(B $(RPAREN)) $(I FunctionBody)793 $(I Type) $(I Identifier) $(B $(LPAREN)) $(I TemplateParameterList) $(B $(RPAREN)) $(B $(LPAREN)) $(LINK2 declaration.html#ParameterList, $(I ParameterList)) $(B $(RPAREN)) $(I FunctionBody) 794 794 ) 795 795 796 796 $(P A function template to compute the square of type $(I T) is: 797 797 ) 798 798 ------ 799 799 T $(B Square)(T)(T t) 800 800 { 801 801 return t * t; 802 802 } 803 803 ------
