Here:

On 2/20/25 08:48, Phil Bouchard via Std-Proposals wrote:

Greetings,

Seems to me regex over istreams would be quite useful. Here's an inefficient implementation:


    inline std::istream& operator >> (std::istream& in, std::string & v)
    {
        static const std::regex string_regex(R"(^\"(.*?)\"$)");

        std::smatch match;

        std::string x;

        for (x += in.get(); in; x += in.get())
            if (std::regex_match(x, match, string_regex))
            {
                v = match[1].str();

                return in;
            }

        throw std::invalid_argument("Parse error.");
    }

Is there any interests in such implementation?


Regards,

--
Email Signature
Fornux Logo
Phil Bouchard LinkedIn Icon
Founder & CEO
T: (819) 328-4743
E: phil@fornux.com | www.fornux.com
320-345 de la Gauchetière Ouest | Montréal (Qc), H2Z 0A2 Canada
The Best Predictable C++ Memory Manager 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.

--
Email Signature
Fornux Logo
Phil Bouchard LinkedIn Icon
Founder & CEO
T: (819) 328-4743
E: phil@fornux.com | www.fornux.com
720 Oliver Ave, San Diego, CA, 92109
The Best Predictable C++ Memory Manager 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.