<div dir="ltr">Hi,<div><br></div><div>I'm completely new to ac++, I'm trying to make a simple tracing aspect as practice. I've created the following aspect:<br><br>#include <iostream><br><br>aspect Tracing {<br>
advice execution ("% ...::%(...)") : before () {<br> std::cout << "in " << JoinPoint::signature() << std::endl;<br> for (int i = 0; i < JoinPoint::ARGS; i++) {<br>
std::cout << (i ? ", " : "") << *tjp->arg<i>();<br>
}<br> std::cout << std::endl;<br> }<br>};<br><br></div><div>When I run ag++ test.cpp, I get this error message:<br><br>tracing.ah:8: error: no matching function for call to `arg'<br>
tracing.ah:8: error: invalid operand to unary `*'<br>tracing.ah:8: error: invalid operand to binary `<<'<br>tracing.ah:8: error: undefined type<br>error: Execution failed: "ac++" --config "/tmp/agxx_pcfgdGZPhu" -p. -c "test.cpp" -o "/tmp/test.cpp_agxx_v4z2Sl"<br>
<br></div><div>If I leave the <i> part out, then I get a dereferencing void pointer error.<br></div><div><br></div><div>Can someone help with fixing this?</div><div><br></div><div>Regards,</div><div>Sander</div></div>