#ifndef __IDXMARKER_AH__ #define __IDXMARKER_AH__ #include #include "namemap.h" using namespace std; aspect IdxMarker { pointcut weave() = call( "% operator [](...)" ) && within( "void check_dual()" ) || call( "% operator []( int (*)[3][2], ...)" ) && within( "void check_dual_partial1()" ) || call( "% operator []( int (*)[2], ...)" ) && within( "void check_dual_partial2()" ) || call( "% operator []( int *, ...)" ) && within( "void check_dual_partial3()" ); advice weave() : before() { cout << " ~~ Idx: "; NameMap::mangle_arraypart( *( tjp->template arg<0>() ) ); cout << " [ " << *( tjp->template arg<1>() ) << " ]" << endl; } }; #endif