Path: utzoo!utgpu!watserv1!watmath!att!rutgers!mephisto!tut.cis.ohio-state.edu!cs.utexas.edu!rice!uw-beaver!fluke!dyndata!dan From: dan@dyndata.UUCP (Dan Everhart) Newsgroups: comp.lang.c++ Subject: Bogus pure macro (was: Re: #defines....) Message-ID: <688@dyndata.UUCP> Date: 6 Jul 90 03:19:31 GMT References: <686@dyndata.UUCP> Organization: Dynamic Data & Electronics, Edmonds WA Lines: 25 In-reply-to: dan@dyndata.UUCP's message of 5 Jul 90 17:51:03 GMT I'd like to recant a suggestion I made recently: In article <686@dyndata.UUCP> dan@dyndata.UUCP (Dan Everhart) writes: #if defined(DEBUG) #define pure { DebuggerTrap (); } #else #define pure = 0 #endif class Xyz { // ... virtual f () pure; // ... } Turns out this will only work for virtuals which return void. Otherwise the lack of a return statement in the debugging inline will get you scolded by the compiler. (Or should. Turns out Zortech 2.0 doesn't catch this error-- a mixed blessing :-) Maybe version 2.1 does, I don't know. Turbo C++ 1.0 does catch it.) Anyway...bag the above idea.