Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsc!crocker From: crocker@cbnewsc.ATT.COM (ronald.t.crocker) Newsgroups: comp.lang.c++ Subject: Re: inlines and __LINE__ Message-ID: <12750@cbnewsc.ATT.COM> Date: 11 Jan 90 17:05:49 GMT References: <2381@ektools.UUCP> Reply-To: crocker@cbnewsc.ATT.COM (ronald.t.crocker,ihp,) Distribution: usa Organization: AT&T Bell Laboratories Lines: 41 In article <2381@ektools.UUCP> randolph@ektools.UUCP (Gary L. Randolph) writes: >I want to use __LINE__ in an inline function as follows: ... code deleted > >Must I use a macro? That's one solution. __LINE__ is a cpp built-in. The way AT&T C++ (i.e. cfront and friends) work, cpp is run before cfront. Hence, after running cpp your program looks like class Trace { private: int state; public: Trace() { state = 1; } int assert() { return 9;} }; main() { Trace a; cout< >Gary Ron Crocker AT&T Bell Laboratories, IHP 1A-213 (312) 713-5262 ...!att!iexist!crocker -- Ron Crocker AT&T Bell Laboratories, IHP 1A-213 (312) 713-5262 ...!att!iexist!crocker