[aspectc-user] weaving in templates

Martin Kuhlemann martin.kuhlemann at web.de
Thu May 25 01:04:58 CEST 2006


Hello AspectC++ -Team,

I failed, when I tried to weave into a template-class following the ac++ 
-quick-reference. Reading that AspectC++ had problems in former releases 
concerning that feature (mailing-list: 10.03.2006) and that in the current 
release it is in experimental state, I'd like to know, what is applicable at 
present (1.0pre3). Could you please send an example?
To avoid talking about already resolved problems, I'd ask you to read the 
following code-lines. The problem is, that the aspect is not applied. Is 
there a bug in my code?

Thank you very much and best regards.
Martin

===================
  #pragma once
  #include <iostream>
  using namespace std;
template<class A>class Client{
public:
	void run(){cout<<"hello"<<endl; }};
===================
  #pragma once
  #include <iostream>
  using namespace std;
aspect deco{
public:
	pointcut decoration() = execution("% ...::%<...>::%(...)");
	advice decoration(): before(){	cout<<"Aspect"<<endl;	}};
===================



More information about the aspectc-user mailing list