std::stringstream equivalent for u32string?

c++, c++11

Solution

The `std::stringstream` is a `typedef`:

typedef basic_stringstream<char> stringstream;

Therefore you can specialize the `std::basic_stringstream<T>` to your needs:

typedef std::basic_stringstream<char32_t> u32sstream;

Problem

Is there an equivalent to `std::stringstream` which will allow me to build a `std::u32string`? If not how could I build up a `std::u32string` from lots of variable length pieces of text consisting of `char32_t` data?

Original source