initializing a C++ std::istringstream from an in memory buffer?

前端 未结 4 940
时光取名叫无心
时光取名叫无心 2020-11-30 06:22

I have a memory block (opaque), that I want to store in a Blob in mySQL through their C++ adapter. The adapter expects a istream:

virtual void setBlob(unsign         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 06:45

    Boost.IOStreams has a stream that works like a stringstream, but wraps a native array, so you avoid having to copy the data.

    std::stringstream always creates its own internal buffer

提交回复
热议问题