https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102482
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #1) > > so I assume the warning is std::initializer_list specific. > > Yes. std::initializer_list is a magic language type that the compiler knows > all about. std::vector is just opaque C++ code that the compiler knows > nothing about. The clue is in the name: -Winit-list-lifetime