Discussion:
[Swig-devel] "Using" for reference type
Pierre-Henri Wuillemin
2015-06-16 10:05:46 UTC
Permalink
Hi,

I think that commit 117f6d0 (Fix C++11 type aliasing seg fault.) is the reason of a new error when parsing "using" for reference type :

A C++ line such as :

using reference = Key&;

was correctly parsed before this commit. After the commit :

error: Syntax error in input(3).




Thanks,
--
Associate Professor - Maître de conférences
Office 420/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
William S Fulton
2015-06-22 06:15:06 UTC
Permalink
On 16 June 2015 at 11:05, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi,
I think that commit 117f6d0 (Fix C++11 type aliasing seg fault.) is the
using reference = Key&;
error: Syntax error in input(3).
I've fixed the parser error now. Please try it out.

William
Pierre-Henri Wuillemin
2015-06-24 11:32:03 UTC
Permalink
Hi William,


It is parsed now, thanks !

However another "using" that was correctly parsed before 117f6d0 :

using BucketAllocator = typename Alloc::template rebind<ListBucket<Val>>::other;

gives an

Error: Syntax error in input(3).


Thanks,
Post by William S Fulton
On 16 June 2015 at 11:05, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi,
I think that commit 117f6d0 (Fix C++11 type aliasing seg fault.) is the
using reference = Key&;
error: Syntax error in input(3).
I've fixed the parser error now. Please try it out.
William
--
Associate Professor - Maître de conférences
Office 420/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
William S Fulton
2015-07-03 07:19:39 UTC
Permalink
I've fixed this now, try again! This was not working as SWIG has not
supported the use of 'template' within types, but now it does, eg this
did not work before:

std::template vector<int> myVectorInt;

William

On 24 June 2015 at 12:32, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi William,
It is parsed now, thanks !
using BucketAllocator = typename Alloc::template
rebind<ListBucket<Val>>::other;
gives an
Error: Syntax error in input(3).
Thanks,
Post by William S Fulton
On 16 June 2015 at 11:05, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi,
I think that commit 117f6d0 (Fix C++11 type aliasing seg fault.) is the
using reference = Key&;
error: Syntax error in input(3).
I've fixed the parser error now. Please try it out.
William
--
Associate Professor - Maître de conférences
Office 420/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Swig-devel mailing list
https://lists.sourceforge.net/lists/listinfo/swig-devel
Pierre-Henri Wuillemin
2015-07-05 15:18:30 UTC
Permalink
Hi William,

It works ! Thanks a lot.



By the way, I still have this problem with "using" inside namespace (see http://sourceforge.net/p/swig/mailman/message/31735548/).
In my project, I need to "sed" the swig-generated file to add some namespace by hand ...

Thanks again !
Post by William S Fulton
I've fixed this now, try again! This was not working as SWIG has not
supported the use of 'template' within types, but now it does, eg this
std::template vector<int> myVectorInt;
William
On 24 June 2015 at 12:32, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi William,
It is parsed now, thanks !
using BucketAllocator = typename Alloc::template
rebind<ListBucket<Val>>::other;
gives an
Error: Syntax error in input(3).
Thanks,
Post by William S Fulton
On 16 June 2015 at 11:05, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi,
I think that commit 117f6d0 (Fix C++11 type aliasing seg fault.) is the
using reference = Key&;
error: Syntax error in input(3).
I've fixed the parser error now. Please try it out.
William
--
Associate Professor - Maître de conférences
Office 420/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Swig-devel mailing list
https://lists.sourceforge.net/lists/listinfo/swig-devel
--
Associate Professor - Maître de conférences
Office 420/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
William S Fulton
2015-07-05 15:38:01 UTC
Permalink
There are a few problems with C++11 using template aliasing and you
should see a warning saying it isn't fully supported yet. I don't
fancy tackling this right now I'm afraid. You might be able to
workaround it by putting a using namespace into the generated code
bringing the classes in your namespace into the global namespace.

William

On 5 July 2015 at 16:18, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi William,
It works ! Thanks a lot.
By the way, I still have this problem with "using" inside namespace (see
http://sourceforge.net/p/swig/mailman/message/31735548/).
In my project, I need to "sed" the swig-generated file to add some namespace by hand ...
Thanks again !
Post by William S Fulton
I've fixed this now, try again! This was not working as SWIG has not
supported the use of 'template' within types, but now it does, eg this
std::template vector<int> myVectorInt;
William
On 24 June 2015 at 12:32, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi William,
It is parsed now, thanks !
using BucketAllocator = typename Alloc::template
rebind<ListBucket<Val>>::other;
gives an
Error: Syntax error in input(3).
Thanks,
Post by William S Fulton
On 16 June 2015 at 11:05, Pierre-Henri Wuillemin
Post by Pierre-Henri Wuillemin
Hi,
I think that commit 117f6d0 (Fix C++11 type aliasing seg fault.) is the
using reference = Key&;
error: Syntax error in input(3).
I've fixed the parser error now. Please try it out.
William
--
Associate Professor - Maître de conférences
Office 420/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Swig-devel mailing list
https://lists.sourceforge.net/lists/listinfo/swig-devel
--
Associate Professor - Maître de conférences
Office 420/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
Continue reading on narkive:
Loading...