[aspectc-user] non-inline introduction

arnd-hendrik.mathias at nefkom.net arnd-hendrik.mathias at nefkom.net
Tue Mar 25 10:36:50 CET 2008

I'm tryin' to introduce a new static member to a class including the  
corresponding non-inline introduction. The code I'm using looks like  

/** \code */

class Device
    unsigned char devspeed;
    unsigned char devclass;
    unsigned char devsubclass;
    unsigned char devprotocol;

aspect Counter
    advice "Device" : slice class
       public : static unsigned int counter;

slice unsigned int Device::counter = 0;

/** \endcode */

Which looks pretty much like the example given in section 5 of the  
ac-language-reference page 27. Nevertheless ag++ reports an "error:  
invalid introduction" to me.
I also tried to put the non-inline introduction into the aspect. Which  
only makes things different but not better. Can anyone give me some  
good advice (or at least some better slice than mine ;-)
Best regards


More information about the aspectc-user mailing list