[aspectc-user] slice function definition
Matthias Urban
matthias.urban at pure-systems.com
Tue Nov 6 17:09:49 CET 2007
Hi Francisco,
> I am having problems with this simple program for testing non-inline slice functions:
>
> //-------------------------file: exec.ah---------------------------
> aspect myAspect{
>
> slice class mySlice{
> public:
> int counter;
> void f();
> }
>
> slice void mySlice::f() { // this is line 14
> ...
Simply move your slice declaration out of the aspect declaration:
//-------------------------file: exec.ah---------------------------
slice class mySlice{
public:
int counter;
void f();
};
slice void mySlice::f() {
printf("In f()\n");
}
aspect myAspect{
advice "Myclass": slice mySlice;
};
//-------------------------file: exec.ah---------------------------
Best regards
More information about the aspectc-user
mailing list