https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115581
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note it looks like clang does some front-end optimization for converting the lambda into a function pointer because my example in comment #1 has the copy still there for clang/LLVM.