> > Hi,
> > may be this is wrong mailing list for the following message but the
> > original GCC mailing list looks to be dead, thus I am trying to put
> > it here ... I suppose that many of you do understand the G++ well ...
> > In my development tool I use professionally (my Job) - Delphi 7 -
> > there are so called events. Event is a pointer to method which
> > actually contains two pointers - one for the class instance (object)
> > and another one for the method code. The compiler ensures the method
> > pointer compatibility, thus there is no risk in this programing
> > technique. The syntax is following:
> > type TKkEvent = function(AParameter1: Integer): Boolean of object;
> > From the help of the Delphi 7 (which evidently is shared by both the
> > Delphi and the C++ Builder) I learned that there is such possibility
> > in C++ as well. The syntax is following:
> > typedef bool (__closure *TKkEvent)(int AParameter1);
> > Unfortunately, it looks to be a feature implemented and supported by
> > Borland C++ only (i.e. not specified by ANSI C++, the __closure
> > keyword was not recognized by G++).
> > I heard that GCC (G++) supports many usefull features which are out
> > of bounds of the official specifications. Consequently, my questions
> > are:
> > Does the G++ support this - by my opinien extremly usefull - feature?
> > What is the syntax?
> This was discussed at large on the c++builder Borland ngs. C++
> supports closures on a more powerful way than Delphi, although it
> loses a bit on elegance of notation, perhaps. That feature is not
> implemented *on* the language, but implemented *with* the
> language. Take a look at Boost Functional and Function libraries for a
> reference implementation (or simply use it without worrying about how
> it works):
Wow, I am not too good in C++ to understand ... and it was so easy in
Delphi ... Well I try to use it.
Ing. Jiri Krivanek
Realtime applications programmer
Beta Control s.r.o.
635 00 BRNO-Bystrc
tel.: +420 5 46 22 34 91 - 36
email 1: JiriKrivanek@...