http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59872
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, the branch that copies needs to be a separate function. http://cplusplus.github.io/LWG/lwg-active.html#2108 might answer your last question