2010-03-30 Jb Evain <jbevain@novell.com>
[mcs.git] / docs / ecma334 / 14.4.2.1.xml
blob1427565cff4c58acf1133d86eb25b846d71fa2f7
1 <?xml version="1.0"?>
2 <clause number="14.4.2.1" title="Applicable function member">
3   <paragraph>A function member is said to be an applicable function member with respect to an argument list A when all of the following are true: <list><list_item> The number of arguments in A is identical to the number of parameters in the function member declaration. </list_item><list_item> For each argument in A, the parameter passing mode of the argument (i.e., value, ref, or out) is identical to the parameter passing mode of the corresponding parameter, and </list_item><list><list_item> for a value parameter or a parameter array, an implicit conversion (<hyperlink>13.1</hyperlink>) exists from the type of the argument to the type of the corresponding parameter, or </list_item><list_item> for a ref or out parameter, the type of the argument is identical to the type of the corresponding parameter. <note>[Note: After all, a ref or out parameter is an alias for the argument passed. end note]</note> </list_item></list></list></paragraph>
4   <paragraph>For a function member that includes a parameter array, if the function member is applicable by the above rules, it is said to be applicable in its normal form. If a function member that includes a parameter array is not applicable in its normal form, the function member may instead be applicable in its expanded form: <list><list_item> The expanded form is constructed by replacing the parameter array in the function member declaration with zero or more value parameters of the element type of the parameter array such that the number of arguments in the argument list A matches the total number of parameters. If A has fewer arguments than the number of fixed parameters in the function member declaration, the expanded form of the function member cannot be constructed and is thus not applicable. </list_item><list_item> If the class, struct, or interface in which the function member is declared already contains another applicable function member with the same signature as the expanded form, the expanded form is not applicable. </list_item><list_item> Otherwise, the expanded form is applicable if for each argument in A the parameter passing mode of the argument is identical to the parameter passing mode of the corresponding parameter, and </list_item><list><list_item> for a fixed value parameter or a value parameter created by the expansion, an implicit conversion (<hyperlink>13.1</hyperlink>) exists from the type of the argument to the type of the corresponding parameter, or </list_item><list_item> for a ref or out parameter, the type of the argument is identical to the type of the corresponding parameter. </list_item></list></list></paragraph>
5 </clause>