Skip to content

Poco::BasicMemoryStreamBuf is missing seekpos() #4492

@obiltschnig

Description

@obiltschnig

In order to support both seekg() and seekp(), a streambuf needs to implement both seekoff() and seekpos().
However, Poco::BasicMemoryStreamBuf currently only has seekoff().

Minimal working seekpos() implementation based on seekoff():

	virtual pos_type seekpos(pos_type pos, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
	{
		off_type off = pos;
		return seekoff(off, std::ios::beg, which);
	}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions