When you have a templated constructor with an R-value reference the compiler implicitly creates a copy and move constructor through the template constructor, and the copy constructor created this way was missing an address space in the reference parameter. I've come up with this fix that deduces the address space for the reference parameter right before it's created, and a corresponding test.
The test is quite big, but rep_outer is necessary to force the compiler to create the copy constructor, and the two template structs are partly for readability.
I feel we can just add an address space explicitly since we are creating the type here for a known use case. However, does Arg actually have an address space? I am just unsure whether we should use generic address space or concrete address space.