[aspectc-user] Problem with slice struct

Carsten V. Munk cvm at daimi.au.dk
Sat Jun 17 15:26:50 CEST 2006


foo.cc:

class Bar
{
        public:
};

aspect Foo
{
        public:
        advice "Bar" : slice struct
        {
                void baz();
        };
};

void Bar::baz()
{
        int i;
        i += 2;
}

stskeeps at ns1 [~/test]# ag++ -v9 -k -c foo.cc
*
*
* AG++ Configuration:
*   Create puma.config: 1
*   Aspect C++ weaver:  ac++
*   C++ compiler:       g++
*   Files:               foo.cc
*   Options (G++):       -v -c -I"."
*   Options (AC++):      -v9 -k -p.
*   Options (total):     -v9 -v -k -c foo.cc -I"." -p.
*   Weave: 1 Compile: 1 Link: 0
*
*
* Generating Puma configuration file
  - Parsing output of g++ compiler
  - Executing: "g++"  -v -c -I"." -E -dM -v -x c++ "/dev/null" 
2>.err.out 1>.std.out
  - Exit: Success
  - removing temporary file: .std.out
  - removing temporary file: .err.out
  - Writing puma configuration file
* Weaving
  - Executing: "ac++" --config "puma.config"  -v9 -k -p. -c "foo.cc" -o 
"foo.acc"
* Running ac++ 1.0pre3
* Handling Translation Unit `foo.cc'.
  - Path "foo.cc"
  - Inserting namespace AC
  - Parsing ...
foo.cc:16: error: `baz' is not a member of `Bar'
  - Aborting
error: Execution failed: "ac++" --config "puma.config"  -v9 -k -p. -c 
"foo.cc" -o "foo.acc"
  - Exitcode: 256 (should be 0 )

Isn't it a bit awkward only to be able introduce methods that are 
inline, in classes?


/Carsten Munk




More information about the aspectc-user mailing list