In variant_sequential_view_test.cpp, line 238, there's a unit test for std::initializer_list. With gcc 9.3, compiling this test fails on lines 451 and 440 of variant_data_policy.h, with "error: ‘new’ of initializer_list does not extend the lifetime of the underlying array [-Werror=init-list-lifetime]". It's a warning treated as an error. Given what the test is doing, I'm not sure this is the end of the world. I can't think of a situation where I'd be assigning an initializer_list that way. The warning is right, it's trying to new an initializer_list when according to cppreference "The underlying array is not guaranteed to exist after the lifetime of the original initializer list object has ended."
Possibly this should really be treated as a warning in this particular case.
In variant_sequential_view_test.cpp, line 238, there's a unit test for std::initializer_list. With gcc 9.3, compiling this test fails on lines 451 and 440 of variant_data_policy.h, with "error: ‘new’ of initializer_list does not extend the lifetime of the underlying array [-Werror=init-list-lifetime]". It's a warning treated as an error. Given what the test is doing, I'm not sure this is the end of the world. I can't think of a situation where I'd be assigning an initializer_list that way. The warning is right, it's trying to new an initializer_list when according to cppreference "The underlying array is not guaranteed to exist after the lifetime of the original initializer list object has ended."
Possibly this should really be treated as a warning in this particular case.