https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91742 --- Comment #1 from Diego <diego@franco-technologies.com> --- The code does work when changing std::vector<int> for any primitive types, i.e. int.