Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nikola.kovacs at gmail dot com
Target Milestone: ---
Created attachment 36569
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36569&action=edit
testcases
D
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68073
--- Comment #2 from nikola.kovacs at gmail dot com ---
It's not my code, I'm just trying to make it work.
The problem is it creates a new string into data, which is
std::aligned_storage:
new (&data) target_type(std::forward(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68073
--- Comment #3 from nikola.kovacs at gmail dot com ---
Never mind, I misread the documentation.
It looks like something else is causing the problem, since this works fine, and
it calls the destructor directly: (modified example from
http
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68073
--- Comment #4 from nikola.kovacs at gmail dot com ---
(sorry for the triple post) I figured it out, it was caused by swap operating
on std::aligned_storage, so it didn't properly swap the string.