@@ -1905,9 +1905,32 @@ $(H3 $(LNAME2 ref-return-scope-parameters, Ref Return Scope Parameters))
19051905 When a parameter is passed by `ref` and has both the `return` and `scope` storage classes,
19061906 it gets $(LINK2 #return-scope-parameters, `return scope`) semantics if and only if the `return` and `scope`
19071907 keywords appear adjacent to each other, in that order.
1908- Specifying a `return ref` and `scope` parameter enables returning a reference to a scope pointer.
1909- In all other cases, the parameter has $(LINK2 #return-ref-parameters, `return ref`) semantics
1910- and regular $(LINK2 #scope-parameters, `scope`) semantics.)
1908+ This behavior is summarized as follows:)
1909+
1910+ $(TABLE2 Combinations of `ref` $(COMMA) `return` and `scope`,
1911+ $(THEAD Order, Interpretation)
1912+ $(TROW `ref`, $(REFP))
1913+ $(TROW `return`, `return`)
1914+ $(TROW `scope`, $(SCOPE))
1915+ $(TROW `return ref`, $(RETURN_REF))
1916+ $(TROW `ref return`, $(RETURN_REF))
1917+ $(TROW `return scope`, $(RETURN_SCOPE))
1918+ $(TROW `scope return`, $(RETURN_SCOPE))
1919+ $(TROW `ref scope`, $(REFP) and $(SCOPE))
1920+ $(TROW `scope ref`, $(REFP) and $(SCOPE))
1921+ $(TROW `ref return scope`, $(REFP) and $(RETURN_SCOPE))
1922+ $(TROW `return scope ref`, $(REFP) and $(RETURN_SCOPE))
1923+ $(TROW `ref scope return`, $(RETURN_REF) and $(SCOPE))
1924+ $(TROW `return ref scope`, $(RETURN_REF) and $(SCOPE))
1925+ $(TROW `scope return ref`, $(RETURN_REF) and $(SCOPE))
1926+ $(TROW `scope ref return`, $(RETURN_REF) and $(SCOPE))
1927+ )
1928+
1929+ $(BEST_PRACTICE do not use `ref return` and `scope return`.)
1930+
1931+ $(P Specifying a `return ref` and `scope` parameter enables returning a reference to a scope pointer.
1932+ In all other cases, the parameter has $(RETURN_REF) semantics
1933+ and regular $(SCOPE) semantics.)
19111934
19121935---
19131936U xerxes( ref return scope V v) // (1) ref and return scope
@@ -4230,3 +4253,7 @@ Macros:
42304253 TITLE=Functions
42314254 ASSIGNEXPRESSION=$(GLINK2 expression, AssignExpression)
42324255 CHECK=✔
4256+ REFP=$(LINK2 #ref-params, `ref`)
4257+ RETURN_REF=$(LINK2 #return-ref-parameters, `return ref`)
4258+ SCOPE=$(LINK2 #scope-parameters, `scope`)
4259+ RETURN_SCOPE=$(LINK2 #return-scope-parameters, `return scope`)
0 commit comments