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<T>(val));

If the string is long, it has to be freed, otherwise there's a memory leak.

The documentation for std::aligned_storage says it has to be destroyed with
explicit destructor calls:
http://en.cppreference.com/w/cpp/types/aligned_storage 

But it also says that only PODtypes can be used, and std::string isn't one. So
that's the problem, right?

Reply via email to