[aspectc-user] non-inline introduction
Panu Bloigu
panu.bloigu at gmail.com
Wed Mar 26 06:03:50 CET 2008
Hello.
Arnd-Hendrik Mathias wrote:
> I just tried this, resulting in our friendly ag++ claiming:
>
> warning: cannot introduce non-inline function or static attribute into
> "class Device". It has to contain link-once code.
>
> which I don't understand.
>
I have encountered the exact same error message! Please see Daniel
Lohmann's explanation of the message on the list on 2008-01-06:
http://aspectc.org/pipermail/aspectc-user/2008-January/001220.html
> Francisco Afonso wrote:
>> And if you use named slices?
>>
>> //------------------------------
>>
>> slice class mySlice{
>> public:
>> static unsigned int counter;
>> };
>>
>> slice unsigned int mySlice::counter = 0;
>>
>>
>> aspect Counter{
>> advice "Device": slice mySlice;
>> };
>> //--------------------------------------------------
>>
>> Regards,
>>
>> Francisco Afonso
>>
>>
>> > Date: Tue, 25 Mar 2008 10:36:50 +0100
>> > From: arnd-hendrik.mathias at nefkom.net
>> > To: aspectc-user at aspectc.org
>> > Subject: [aspectc-user] non-inline introduction
>> >
>> > Hi,
>> > 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
>> > this:
>> >
>> > /** \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
>> >
>> > Arnd-Hendrik
>> >
>> >
>> > _______________________________________________
>> > aspectc-user mailing list
>> > aspectc-user at aspectc.org
>> > http://www.aspectc.org/mailman/listinfo/aspectc-user
>>
>> ------------------------------------------------------------------------
>> How well do you know your celebrity gossip? Talk celebrity smackdowns
>> here. <http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
More information about the aspectc-user
mailing list