[aspectc-user] advice that(type) : ..() {..} gives compiler error

Hans VB hans.vanbroeckhoven at telenet.be
Tue Jun 21 17:45:13 CEST 2005


I quickly queried bugzilla but did not find anything for 'that', so 
here's a quick sketch of the problem which i only tried with g++ (due to 
temporary lack of time)...

class Worker {
    void work() {
        cout << "working" << endl;

class Manager {
Worker w;
    void manage() {

advice that("Worker") : after() {
    cout << "that Worker" << endl;

gives this :

make -k all
Building file: ../main.cpp
ac++ -r repo.acp -p .. -o main.acc -c ../main.cpp
g++ -x c++ -D_useAC -O0 -g3 -Wall -c -fmessage-length=0 main.acc -o main.o
../ManagerWorker.h:21: warning: `class Manager' has virtual functions 
but non-virtual destructor
: In static member function `static void 
:13: error: `srcthis' undeclared (first use this function)
:13: error: (Each undeclared identifier is reported only once for each 
function it appears in.)
make: *** [main.o] Error 1

So it's about the error concerning 'srcthis'.
I hope I am using "that()" correctly...

It does work when i do
advice execution("% %::%(...)") && that("Worker") {}
(but that woulnd't be exactly the same functionality)


More information about the aspectc-user mailing list