[aspectc-user] non-inline introduction
os at aspectc.org
Sun Mar 30 16:15:39 CEST 2008
whenever a slice is introduced into a target class, the weaver will
include the file that contains the slice definition in the file that
contains the target class definition. The reason is that the file that
contains the slice might also contain definitions that are needed for
the slice members. By this means ac++ generates #includes. This behavior
is documented somewhere in the compiler manual.
If your code contains slice introductions, this behavior might result in
a cyclic include graph. ac++ detects this problem and reacts with an
error message. Usually, the problem is caused by #includes in an aspect
header file and an introduction into the included file by the same
aspect. It helps to use a named slice definition and to move the slice
definition into a separate aspect header file.
arnd-hendrik.mathias at nefkom.net schrieb:
> Zitat von Panu Bloigu <panu.bloigu at gmail.com>:
>> Still one (very small)
>>> "problem": Even if I add preprocessor statements to avoid double
>>> inclusion I still get one warning "can't include 'devices.ah' to
>>> avoid include cycle". I still don't include devices.ah anywhere. Do
>>> you have an idea how to remove this?
>> I've never seen that before. Are you using the SVN version of
>> AspectC++? Maybe the AspectC++ developers on this list can help you
>> with that.
> OK. This seems to be different behavior of different versions of ac++:
> The ac++ 1.0pre3 (Mar 16 2006) doesn't claim anything but 1.0pre4 (Feb
> 13 2007) does.
>>> (note that aspects cannot inherit from non-virtual classes
>> I did not know that. Where did you find this information?
> In some of my experiments I faced some error messages of ac++ claiming
> this. I did not really understand this message, but introducing a
> virtual method into the parent class helped in that moment. Meanwhile,
> I cannot reproduce the effect, so sorry for the noise.
> Best regards
> aspectc-user mailing list
> aspectc-user at aspectc.org
More information about the aspectc-user