I can't seem to be able to find an easy simple solution, how to get bidirectional iterator from char *buffer with defined bufferSize. I don't want to copy the buffer to std::string (too expensive), I just want something like std_whatever::buffer_wrapper myWrappedBuffer(myBuffer, mySize); and then use myWrappedBuffer.begin() and myWrappedBuffer.end() in <algorithm> functions. What is the simplest way to do that? I really don't want to implement the iterator myself. I know there is boost::string_ref and maybe std::string_view, but I don't want to use boost just for this and can't use c++17.