C++ Logo

std-proposals

Advanced search

Re: [std-proposals] regex over istreams

From: Phil Bouchard <boost_at_[hidden]>
Date: Thu, 20 Feb 2025 16:39:01 -0500
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().

>
>
>
> I think that's a pretty efficient way of writing a decent parser.
>
>
> Extracting one char at a time and then using std::regex repeatedly is
> anything but efficient.
>

-- 
Fornux Logo <https://www.fornux.com/>  
*Phil Bouchard*  LinkedIn Icon
<https://www.linkedin.com/in/phil-bouchard-5723a910/> 
Founder & CEO
T: (819) 328-4743
E: phil_at_[hidden]| www.fornux.com <http://www.fornux.com>
320-345 de la Gauchetière Ouest| Montréal (Qc), H2Z 0A2 Canada
The Best Predictable C++ Memory Manager
<https://static.fornux.com/c-superset/> Le message ci-dessus, ainsi que
les documents l'accompagnant, sont destinés uniquement aux personnes
identifiées et peuvent contenir des informations privilégiées,
confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce
message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named
recipients only and may contain privileged or confidential information
which is not to be disclosed. If you received this communication by
mistake please destroy all copies.

Received on 2025-02-20 21:39:04