[aspectc-user] function with template

Olaf Spinczyk os at aspectc.org
Tue Feb 26 14:19:42 CET 2008


Hi,

I'm sorry, ac++ does not support weaving in templates yet. These 
potential join-points are silently ignored by the match mechanism.

The reason is that weaving in templates requires a full syntactic and 
semantic analysis of the template instances by the underlying C++ 
parser. However, this parser feature is still experimental and does not 
work for real-world code. Once the parser is able to perform this 
analysis reliably, I can implement the necessary code transformations 
within the aspect weaver.

Best regards,

Olaf

PS: I've added your question to the AspectC++ FAQ.

meriam.kallel at mecscompany.com wrote:
> Hello,
>
> I want to use aspectc with programs coded in SystemC.
> I succed in compiling, but I want that the aspect detects the execution of a
> function that is defined with a template:
>
> template <class d, class a>
> void test()
> {
>    ...
>
> }
>
> In the aspect, i have tried:
> aspect Action {
>   advice execution("void test()") : around()  {
>     ...
>   }
>
> and
>   advice execution("void test%()") : around()  {
>     ...
>   }
>
> and in the two cases, the function is not detected.
>
> can you help me please.
> Thank you.
>
> Regards,
> Meriam.
>
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
>
>   




More information about the aspectc-user mailing list