July 18, 2004 'out' keyword, arrays and variadic functions | ||||
---|---|---|---|---|
| ||||
# void foo(int[] f, ...) { # foreach(int i, TypeInfo ti; _arguments) { } # } # void bar(out int[] f, ...) { # foreach(int i, TypeInfo ti; _arguments) { } # } both functions compile just fine, however if you try to call 'bar' you will get Access Violation. reason: pointer to typeinfo table is not being pushed, instead of pushing number of variadic arguments offset of this number is being pushed. |
Copyright © 1999-2021 by the D Language Foundation