Re: Using g_signal_connect in class



I think he meant that in order to use the function with g_signal_connect(), a C linkage is not needed (and i think this is actually right, too).

2008/7/19 Chris Vine <chris cvine freeserve co uk>:
On Sat, 19 Jul 2008 13:42:58 +0200
Jean Bréfort <jean brefort normalesup org> wrote:
> Le samedi 19 juillet 2008 à 12:29 +0100, Chris Vine a écrit :
> > This will work with gcc/g++ but it is not standard conforming, as
> > static class functions do not have C linkage, and the C++ standard
> > states that functions otherwise identical with C++ and C linkage are
> > different types.
> >
> > To be standard conforming you should use a friend function (if it
> > needs access to private data) declared extern "C".
>
> The extern "C" declaration is not needed.

Are you saying there is a misprint in the C++ standard, or that
with the particular compiler you use it is not necessary?  If the
latter, what part of my post do you disagree with?

Chris

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list



--
------------
Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
[Bitte beachten Sie, dass dem Gesetz zur Vorratsdatenspeicherung zufolge
jeder elektronische Kontakt mit mir sechs Monate lang gespeichert wird.]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]