https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102984
--- Comment #2 from Milian Wolff <mail at milianw dot de> --- Similarly: std::vector<spinlock> locks(10); // works std::vector<spinlock> locks(10, spinlock()); // doesn't work This report here was motivated by stumbling over this report over at https://github.com/efficient/libcuckoo/issues/53. I found a workaround for that area thankfully, simply by not passing along the default value at all. @ jakub: Note that it works fine for normal situations, it's only the stack allocated default arg which triggers this issue. The way I understand https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122 is that this should be working with C++17?