Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poco::BasicMemoryStreamBuf is missing seekpos() #4492

Closed
obiltschnig opened this issue Mar 13, 2024 · 0 comments
Closed

Poco::BasicMemoryStreamBuf is missing seekpos() #4492

obiltschnig opened this issue Mar 13, 2024 · 0 comments
Assignees

Comments

@obiltschnig
Copy link
Member

obiltschnig commented Mar 13, 2024

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);
	}
@obiltschnig obiltschnig added this to the Release 1.13.3 milestone Mar 13, 2024
@obiltschnig obiltschnig self-assigned this Mar 13, 2024
@obiltschnig obiltschnig changed the title Poco::BasicMemoryStreamBuf is missin seekpos() Poco::BasicMemoryStreamBuf is missing seekpos() Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant