I know there is isArray!T and similar functionality in std.traits. But I couldn't find the functionality that can help me check if I have a multidimensional array. Is there any? How do I create my own?
Thanks in advance.
Thread overview |
---|
July 12, 2021 How do I check if a variable is a multidimensional (2D) array? | ||||
---|---|---|---|---|
| ||||
I know there is isArray!T and similar functionality in std.traits. But I couldn't find the functionality that can help me check if I have a multidimensional array. Is there any? How do I create my own? Thanks in advance. |
July 12, 2021 Re: How do I check if a variable is a multidimensional (2D) array? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kirill | On Monday, 12 July 2021 at 04:25:00 UTC, Kirill wrote: >I know there is isArray!T and similar functionality in std.traits. But I couldn't find the functionality that can help me check if I have a multidimensional array. Is there any? How do I create my own? Thanks in advance. from https://github.com/PhilippeSigaud/D-templates-tutorial
as an example of a recursive template. There's also an implementation for ranges. |
July 12, 2021 Re: How do I check if a variable is a multidimensional (2D) array? | ||||
---|---|---|---|---|
| ||||
Posted in reply to jfondren | On Monday, 12 July 2021 at 05:08:29 UTC, jfondren wrote: >On Monday, 12 July 2021 at 04:25:00 UTC, Kirill wrote: >I know there is isArray!T and similar functionality in std.traits. But I couldn't find the functionality that can help me check if I have a multidimensional array. Is there any? How do I create my own? Thanks in advance. from https://github.com/PhilippeSigaud/D-templates-tutorial
as an example of a recursive template. There's also an implementation for ranges. Thanks! |