[aspectc-user] overloaded operator ++() and ++(int)
Hans VB
hans.vanbroeckhoven at telenet.be
Mon May 23 20:49:26 CEST 2005
Hey,
it seems to work if i use execution in stead of call (maybe because i am
in main()), so ok...
What bothers me now is the following :
I want to select all constructions of objects of class B but not those
that happen in/caused by operators.
this is my operator ++(int) :
B operator ++(int) {
B tmp = *this;
++(*this);
return tmp;
}
This doesnt return a reference because you'd better not return reference
of local temp vars. What it does do is call a constructor when it
returns tmp.
I manage to filter out the construction of tmp, but not the one of this
returned tmp :
pointcut allRealConstructions() = construction("B") && !cflow(
execution("% B::operator %(...)") );
Any ideas would be greatly appreciated! (and quite urgently too - this
is in fact for my thesis which has to be finished real soon ;-)
Greets,
Hans
More information about the aspectc-user
mailing list