
My version of assert.hpp has the line: #include <assert.h> Shouldn't this be: #include <cassert> ? -Jason

it should work indenticaly either way, but IMO <cassert> should be used for C++ code. On Sun, 13 Feb 2005 21:14:17 -0700, Jonathan Turkanis <technews@kangaroologic.com> wrote:
Jason Hise wrote:
My version of assert.hpp has the line: #include <assert.h> Shouldn't this be: #include <cassert> ?
"assert.h" just contains macros, so it shouldn't make any difference.
Jonathan
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Sérgio Vale e Pace wrote:
it should work indenticaly either way, but IMO <cassert> should be used for C++ code.
It's a leftover from the days of compilers that don't have <cxx> versions of <xx.h>. Since <assert.h> is identical to <cassert>, there was no point in breaking those just for the style points.

On Monday 14 February 2005 15:03, Peter Dimov wrote:
Sérgio Vale e Pace wrote:
it should work indenticaly either way, but IMO <cassert> should be used for C++ code.
It's a leftover from the days of compilers that don't have <cxx> versions of <xx.h>. Since <assert.h> is identical to <cassert>, there was no point in breaking those just for the style points.
I'd say that one can get the style points for documenting this decision. /* we use <assert.h> instead of the more proper <cassert> because support for the old header is far more widespread among compilers and because it makes absolutely no difference since it only contains macros. */ #include <assert.h> Uli

On Monday 14 February 2005 15:03, Peter Dimov wrote:
Sérgio Vale e Pace wrote:
it should work indenticaly either way, but IMO <cassert> should be used for C++ code.
It's a leftover from the days of compilers that don't have <cxx> versions of <xx.h>. Since <assert.h> is identical to <cassert>, there was no
At 02:57 PM 2/14/2005, Ulrich Eckhardt wrote: point
in breaking those just for the style points.
I'd say that one can get the style points for documenting this decision.
/* we use <assert.h> instead of the more proper <cassert> because support
for the old header is far more widespread among compilers and because it makes absolutely no difference since it only contains macros. */ #include <assert.h>
Unless someone objects (Peter?) I'll commit a slightly shorter version of the above: #include <assert.h> // .h to support old libs w/o <cassert> - effect is the same --Beman

Beman Dawes wrote:
Ulrich Eckhardt wrote:
Peter Dimov wrote:
It's a leftover from the days of compilers that don't have <cxx>
I'd say that one can get the style points for documenting this decision.
Unless someone objects (Peter?) I'll commit a slightly shorter version of the above:
#include <assert.h> // .h to support old libs w/o <cassert> - effect is the same
This is definitely a good idea, to make sure someone doesn't accidentally 'correct' the header. Jonathan
participants (6)
-
Beman Dawes
-
Jason Hise
-
Jonathan Turkanis
-
Peter Dimov
-
Sérgio Vale e Pace
-
Ulrich Eckhardt