C++ Logo

std-proposals

Advanced search

Re: [std-proposals] regex over istreams

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Thu, 20 Feb 2025 23:51:15 +0000
On Thu, 20 Feb 2025, 21:39 Phil Bouchard, <boost_at_[hidden]> wrote:

>
>
> On 2/20/25 16:19, Jonathan Wakely wrote:
> >
> >
> > On Thu, 20 Feb 2025 at 20:41, Phil Bouchard via Std-Proposals
> > <std-proposals_at_[hidden] <mailto:std-proposals_at_[hidden]>>
>
> > wrote:
> >
> > regex_match would get 1 more character on the need basis using
> in.get()
> > quite simply. If it fails then it would rewind the read pointer to
> > where
> > it was.
> >
> >
> > How? iostream putback is extremely limited.
>
> Using seekg().
>

That might work on an ifstream or istringstream but not on an arbitrary
istream.

Received on 2025-02-20 23:51:38