http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53157
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-23 19:31:28 UTC --- G++ currently implements an early proposed resolution of issue 696; some people suggested that a mention of a constant variable from an enclosing scope that is not explicitly captured should be replaced with its value (as an rvalue). That's what's causing the error you see. To fix this properly, we need to improve the compiler to distinguish between mentions that are odr-uses and those that are not.