On Tuesday, 28 March 2023 at 05:05:58 UTC, Alexander Zhirov wrote:
`Error: cannot cast expression 'cast(ubyte*)arr' of type 'ubyte*' to 'ubyte[16]'`
Here is the working example: ```d import std.stdio; import std.uuid; void main() {ubyte[] arr = [159, 199, 22, 163, 13, 74, 145, 73, 158, 112, 7, 192, 12, 193, 7, 194];
UUID(arr[0 .. 16]).writeln; } ```You just need to take a slice of your array to guarantee that it has only 16 elements, and thus, pass it to `UUID`.