We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
staticArray does not compile when string with:
mir-core\source\mir\functional.d(57,12): Error: returning a escapes a reference to variadic parameter a
a
The code below compiles, removing the comment doesn't.
import mir.functional: staticArray; import mir.ndslice; auto resuF = mir.ndslice.cartesian([0,1,2], [0,1], [4,5,6]).flattened.map!staticArray; writeln(resuF); auto resuS = mir.ndslice.cartesian(["A", "B"], ["c","b"]).flattened;//.map!staticArray; writeln(resuS);
Replacing current staticArray (in mir.functional) with code below works:
T[N] staticArray(T, size_t N)(T[N] a...) if (!is(T == string)) { return a; } T[N] staticArray(T, size_t N)(T[N] a...) if (is(T == string)) { T[N] ret; static foreach(i; 0..a.length) ret[i] = a[i]; return ret; }
The text was updated successfully, but these errors were encountered:
@fabienmica Could yo make MR with isDynamicArray!T instead of is(T == string)?
isDynamicArray!T
is(T == string)
Sorry, something went wrong.
ok will do
No branches or pull requests
staticArray does not compile when string with:
The code below compiles, removing the comment doesn't.
Replacing current staticArray (in mir.functional) with code below works:
The text was updated successfully, but these errors were encountered: