Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: Is it possible to test if a raw pointer is pointing to a valid object? Date: Wed, 24 Aug 2022 11:59:49 -0700 Organization: None to speak of Lines: 18 Message-ID: <87zgftwjq2.fsf@nosuchdomain.example.com> References: <874jy1y1ss.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader01.eternal-september.org; posting-host="ba7b50a2a22d5fe194a1cea15d08e5dc"; logging-data="3571384"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PPmvqERtD+txbOlUTrfbc" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:qnE0i/sVREbLGzZfTxIBsCvx6iY= sha1:n0WT6iNsn21xwCRBuOHr0neuzxs= Xref: csiph.com comp.lang.c++:86041 JiiPee writes: > On 24/08/2022 20:51, JiiPee wrote: >> On 24/08/2022 20:44, Keith Thompson wrote: >>>> void main() >>> Of course main returns int, not void.  (I know that was in the parent >>> article.) >> but its shorter to type, hehe > > actually compiles in visual studio Most C++ compilers aren't fully conforming by default. Any conforming C++ implementation must diagnose `void main()` (and may then either accept it or reject it). -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */