[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: type of used includes
From: |
Ingo Ruhnke |
Subject: |
Re: type of used includes |
Date: |
20 Jun 2002 14:31:38 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
David Philippi <address@hidden> writes:
> On Thursday 20 June 2002 13:23, address@hidden wrote:
>> Index: counter.cxx
>> ===================================================================
>> RCS file: /usr/local/cvsroot/Games/Pingus/src/counter.cxx,v
>> +#include <assert.h>
>
> We should either use <cassert> or <assert.h> in all cases. If
> there's no pressing need to support very old / buggy compiler we
> should use cassert, cstdio since this is recommended in quite every
> book about C++.
<assert.h> is guaranteed to work on any C++ compile around, while
<cassert> might also work, but you can never be 100% sure, since some
Compilers just have:
-- File: cassert ---
namespace std {
#include <assert.h>
}
Which causes all kinds of throuble if something within assert.h is
defined as a Macro, so you can never be sure if adding a std:: is good
or bad. So I would suggest we stick with the old C headers, since they
are guaranteed to work best at the moment.
--
Advent: http://www.freesoftware.fsf.org/advent/
Feuerkraft: http://www.freesoftware.fsf.org/feuerkraft/
Pingus: http://pingus.seul.org/ || ICQ: 59461927
Home: http://pingus.seul.org/~grumbel/ || JabberID: address@hidden