Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!princeton!udel!wuarchive!usc!ucsd!ucbvax!galileo.berkeley.edu!jbuck From: jbuck@galileo.berkeley.edu (Joe Buck) Newsgroups: comp.lang.c++ Subject: Re: The __cplusplus macro - is it portable? Message-ID: <39751@ucbvax.BERKELEY.EDU> Date: 27 Nov 90 17:27:34 GMT References: <5954@uqcspe.cs.uq.oz.au> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: jbuck@galileo.berkeley.edu (Joe Buck) Lines: 22 In article <5954@uqcspe.cs.uq.oz.au>, rhys@batserver.cs.uq.oz.au (Rhys Weatherley) writes: > The subject should say it all :-). Basically, Turbo C++ has the macro > __cplusplus which is defined when Turbo C++ is compiling using C++ conventions. Yes, __cplusplus is part of the draft language standard. Enter broken record mode: Professional C++ programmers should have a copy of "The Annotated C++ Reference Manual" by Ellis & Stroustrup, which answers all questions like these. Exit broken record mode. extern "C" is also part of the standard. No compiler really agrees with E&S in all respects (probably cfront 2.1 comes closest, but I haven't used it). If your compiler disagrees with E&S, complain to the vendor or mail a bug report. -- Joe Buck jbuck@galileo.berkeley.edu {uunet,ucbvax}!galileo.berkeley.edu!jbuck