https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70723
--- Comment #2 from m.cencora at gmail dot com --- If that's the case then it should get automatically resolved once C++17 is implemented - C++17 introduces constexpr lambdas. But it would be great to have this optimization also in C++14 mode.