const std = @import("std");
const Vector = std.meta.Vector;
pub fn main() anyerror!void {
var b = Vector(4, u32){ 1, 2, 3, 4 };
b = Vector(4, u32){ b[3], b[2], b[1], b[0] };
std.debug.print("{}\n", .{b});
}
Prints
instead of
Using a temporary variable produces the correct output. Is assigning a vector containing some of its own elements UB?