This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "self" keyword


Andreas,

That would work. But now I'm back to remembering to fix something when I copy / re-use code.

I'll admit it's minor. But we have tools to help us for a reason, right? :-)

Best regards,
Rick C. Hodgin

On 06/14/2012 04:38 PM, Andreas Schwab wrote:
"Rick C. Hodgin"<foxmuldrster@yahoo.com> writes:

I can also see a use for generated code where there's a base source code
template in use with an embedded include file reference that changes as
it's generated per pass, such as:

int step1(int a, int b)
{
#define self step1
#include "\current_task\step1.cpp"
#undef self
}

int step2(int a, int b)
{
#define self step2
#include "\current_task\step2.cpp"
#undef self
}
Andreas.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]