[Bug c++/91953] [8/9/10 Regression] G++ rejects lambda with constexpr variable
kyrylo.bohdanenko at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 8 09:13:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91953
--- Comment #5 from Kyrylo Bohdanenko <kyrylo.bohdanenko at gmail dot com> ---
Sorry, the move constructor isn't necessary...
template<typename _Tp, _Tp __v>
struct integral_constant {
constexpr integral_constant(const integral_constant&) noexcept {}
constexpr integral_constant() noexcept {}
};
int main() {
auto l = [](auto value) {
constexpr auto i = value;
static_cast<void>(i);
};
l(integral_constant<unsigned, 0>{});
}
More information about the Gcc-bugs
mailing list