Right, but it will also copy the volatile attribute of its predecessor, which means that you must either recast the variable anyway or not use volatile for the generator.
So does detach serve a purpose here? I assume volatile in the generator is good, or why else have that flag option at all?