mardi 3 janvier 2017

const char * to std::basic_iostream

I have a pointer to a const *char buffer as well as it's length, and am trying to use an API (in this case, the AWS S3 C++ upload request) that accepts an object of type:

std::basic_iostream <char, std::char_traits <char>>

Is there a simple way to convert my buffer into a compatible stream, preferably without actually copying over the memory?

Aucun commentaire:

Enregistrer un commentaire