Re: 4.2 upgrade issues
William S Fulton <[email protected]> Mon, 29 Apr 2024 07:36:33 +0100
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <CANGqftCJdfW9wumLNRE=0AOWJPGBMsxnxpqQ67-RWi+zsM71sg@mail.gmail.com> |
--===============8854343833322302743==
Content-Type: multipart/alternative; boundary="000000000000a638880617367b64"
--000000000000a638880617367b64
Content-Type: text/plain; charset="UTF-8"
The following parses fine for me with swig-4.2.1:
%module example
%inline %{
#include <regex>
#include <string>
std::string _endHeaderString;
std::regex endheader{R"([ \t]*)" + _endHeaderString + R"([ \t]*)"};
%}
If you are still having problems, please raise a Github issue with all the
details to replicate.
William
On Wed, 17 Apr 2024 at 17:19, Ayman Habib <[email protected]> wrote:
> Hello,
>
> Trying to upgrade our code base that uses swig 4.1.1 to generate bindings
> to swig version 4.2, I'm running into problems with regular expressions
> Swig parsing output follows...
>
> ...Utilities.h(158): error : Unterminated raw string, started with R"( is
> not terminated by )"
>
> the corresponding C++ line in the header file is
> std::regex endheader{R"([ \t]*)" + _endHeaderString + R"([ \t]*)"};
>
> The release notes indicate that there were changes relevant to regular
> expressions, but it's not clear to me if this code is still allowed and we
> should hold off upgrading pending a fix or if we should update the code on
> our side.
>
> Your advice or pointers to relevant changes would be much appreciated,
>
> Thank you,
> -Ayman
>
>
> _______________________________________________
> Swig-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/swig-user
>
--000000000000a638880617367b64
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>The following parses fine for me with swig-4.2.1:</di=
v><div><br></div><div>%module example<br><br>%inline %{<br>#include <reg=
ex><br>#include <string><br>std::string _endHeaderString;<br>std::=
regex endheader{R"([ \t]*)" + _endHeaderString + R"([ \t]*)&=
quot;};<br>%}</div><div><br></div><div>If you are still having problems, pl=
ease raise a Github issue with all the details to replicate.</div><div><br>=
</div><div>William</div><div><br></div></div><br><div class=3D"gmail_quote"=
><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 17 Apr 2024 at 17:19, Ayman =
Habib <<a href=3D"mailto:[email protected]">[email protected]</a>> =
wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=
=3D"ltr">Hello,<div><br></div><div>Trying to upgrade our code base that use=
s swig 4.1.1 to generate bindings to swig version 4.2, I'm running into=
problems with regular expressions</div><div>Swig parsing output follows...=
</div><div><br></div><div>...Utilities.h(158): error : Unterminated raw str=
ing, started with R"( is not terminated by )"<br></div><div><br><=
/div><div>the corresponding C++ line in the header file is</div><div>std::r=
egex endheader{R"([ \t]*)" + _endHeaderString + R"([ \t]*)&q=
uot;};<br></div><div><br></div><div>The release notes indicate that there w=
ere changes relevant to regular expressions, but it's not clear to me i=
f this code is still allowed and we should hold off upgrading pending a fix=
or if we should update the code on our side.</div><div><br></div><div>Your=
advice or pointers to relevant changes would be much appreciated,</div><di=
v><br></div><div>Thank you,</div><div>-Ayman</div><div><br></div><div><br><=
/div></div>
_______________________________________________<br>
Swig-user mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Swig-u=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/swig-user" rel=3D"n=
oreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/s=
wig-user</a><br>
</blockquote></div>
--000000000000a638880617367b64--
--===============8854343833322302743==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============8854343833322302743==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user
--===============8854343833322302743==--