Streaming to temp object without copy elision causes a segfault