[aspectc-user] problem with a simple template instance matching test

riccobene-zzzz0002 at mailblocks.com riccobene-zzzz0002 at mailblocks.com
Tue Nov 30 17:04:37 CET 2004


Hello,
i am testing the template instance matching in version 0.9 of ac++.
The simple tracing aspect of the AC++ Quick Reference Guide instantiated in this way
aspect TraceMain: public Trace
{
   pointcut functions() = call("% Value<int>::%(...)") && within("% main(...)");
};
has no effect. In this way:
aspect TraceMain: public Trace
{
   //pointcut functions() = execution("Value<int>");
};
it cause ac++.exe crash for memory access violation.
I am using ac++ on Win32 platform with --vc and --skip-bodies-non-prj flags.
The main.cpp is the following:
#include <iostream>

template <class T>
class Value
{
public:
   Value(T value): value_(value) {}
   ~Value() {}
   void dummy()
   {
   }
private:
   T value_;
};
int main ()
{
   std::cout << "in main\n";
   Value<int> a(1);
   a.dummy();
   std::cout << "Press return to exit...";
   std::cin.get();
   return 0;
}
Thanks,
michelangelo riccobene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20041130/3a628e55/attachment.html>


More information about the aspectc-user mailing list